Iam really confuse.
I manage to install PHP and mysql database.
I could't retrieve data from the database but could not insert into it. I find in incomprehensible.
Anytime I try to insert I have this message.Notice: Undefined variable: one in c:\inetpub\wwwroot\try.php on line 7
Notice: Undefined variable: two in c:\inetpub\wwwroot\try.php on line 7
Notice: Undefined variable: srel in c:\inetpub\wwwroot\try.php on line 11
couldn't execute
This is the script i used.
<?php
$sql = "insert into test (id,junk) values ('$one','$two')";
$link = mysql_connect("localhost", "", "")
or die("Could not connect: " . mysql_error());
$tim = mysql_select_db("") or die ("unable");
$srel = mysql_query($srel,$link) or die ("couldn't execute");
if (!$srel) {
echo " failure";
}
else {
echo "good";
}
//script to retrieve from the database;
/
$result = mysql_query("select from test",$link);
while ($row = mysql_fetch_row($result)) {
foreach ($row as $item) {
echo "$item\n";
}
}
*/
//mysql_close($link);
?>