Aww. I'm so sorry. I've been reading topics posted here about updating database using form. but i can't seem to find my error.
I want to update my database using HTML forms. where in after i click a button "Edit Record" A page containing forms will appear where i can update using input type as text. then after will click the button "Done Editing" and a message Successful will appear
here is my code for update: this will just print the "Successful" but then the database isn't updating. o.o
<?php
$a=$_POST['e'];
$b=$_POST['f'];
$con = mysql_connect("localhost","*****","****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("*****", $con);
mysql_query("UPDATE Sample SET Fname='$a' AND Lname='$b'");
echo "Successful";
mysql_close($con);
?>
I'm a total noob. i'm self studying about this topic. thank you so much.