hello people i have this problem which i dont know the cause, no error display but i cant see the result. the result is basically to insert the piece of information into my database. i design a form that server as the interface that capture the data and processes it thru php file, the content of the file are:
require_once("database.php");
//connect to the mysqlserver
$dbserver = mysql_connect($hostname,$username,$pword);
if (!$dbserver) echo('Unable to connect to Mysql:'. mysql_error());
$select_db = mysql_select_db($dbase, $dbserver) ;
if (!$select_db) echo('unable to select database:' . mysql_error());
if (isset($_POST['title']) && isset($_POST['frmFirst']) && isset($_POST['frmLast'])
&& isset($_POST['frmSex']) && isset($_POST['frmEmail'])
&& isset($_POST['frmOccupation']))
{
$title = get_post('title');
$firstname = get_post('frmFirst');
$lastname = get_post('frmLast');
$sex = get_post ('frmSex');
$email = get_post ('frmEmail');
$occupation = get_post ('frmOccupation');
$query = "INSERT INTO personal_details VALUES" .
"('null','$title','$firstname','$lastname','$sex','$email','$occupation')";
$result = mysql_query($query,$dbserver);
if (!$result) echo "INSERT failed: $query<br /> ". mysql_error();
}
function get_post($val)
{
mysql_real_escape_string($_POST[$val]);
}
?>
am using Easyphp-5.3.8.0 and when i try to veiw the inserted data done by this code above nothing is found in that table of the database in phpMyadmin and the database exist. kindly please outline likely causes,thanks