query()
Posted: Fri Aug 11, 2006 4:59 am
Pimptastic | Please use
</body>
</html>
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
dear all ,
I have had error message : Fatal error: Call to undefined function query() in D:\htdocs\quiz\data.php on line 39
when i used function query() .How to do this,brosss???
and this is my code :Code: Select all
<html>
<body>
<p> 1.Hay chon 1 trong 2 : </p>
<?php
$question= $_POST['question'];
$answer1 = $_POST['answer1'];
$answer2 = $_POST['answer2'];
if(!$question||!$answer1||!$answer2){
echo 'BAn dien ko day du.hay quay lai de hoan thanh';
exit;
}
if(!get_magic_quotes_gpc())
{
$question = addslashes($question);
$answer1 = addslashes($answer1);
$answer2 = addslashes($answer2);
}
@ $db = mysql_connect("localhost", "root","ha1985") or die("No way");
mysql_select_db("myapp",$db) or die("KhĂ´ng chọn cơ sở dữ liệu được");
[size=18] $query = "insert into question " . "(question,answer1,answer2) values"
. "('$question', '$answer1', '$answer2')";
query($query);
$msg .= "<h3>complete to sign";
$question = $answer1 = $answer2 = "";[/b]
?></html>
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]