Okay, but that doesn't answer my question. In this script:
<?php
$host="localhost"; // Host name
$username="username"; // Mysql username
$password="password"; // Mysql password
$db_name="db_name"; // Database name
$tbl_name="table_name"; // Table name
// Make a MySQL Connection
mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("db_name") or die(mysql_error());
// update data in mysql database
$sql="UPDATE $tbl_name SET fname='$fname', lname='$lname', month_birth='$month_birth', mobile='$mobile', email='$email' WHERE id='$id'";
$result=mysql_query($sql);
// if successfully updated.
if($result){
echo "Record Successfully Updated";
}
else {
echo "ERROR";
}
?>
(assuming that is indeed the entire script), where are the variables I mentioned defined?
Set display_errors to On and error_reporting to E_ALL, and I'll bet you'll find the answer to my question is: They aren't defined. As such, you might want to take a look at this manual page: [man]variables.external[/man].