hi i am a junior web designer and this the problem i am having is that i cannot find were what i am doing wrong could someone please correct. as far as i can tell i am doing everything ok. the code which i have made wont do the result. my code is shown below. thanks
<?php
echo "This is PHP!";
$db_host = "";
$db_username = "";
$db_password = "";
$db_database = "";
$db = mysql_connect ($db_host, $db_username, $db_password);
Mysql_select_db($db_database, $db);
if($db){
echo "Successful1";
}
else {
echo "ERROR1";
}
$subject=$_POST['subject'];
$number=$_POST['number'];
$customer_mail=$_POST['customer_mail'];
$detail=$_POST['detail'];
// Insert data into mysql
$sql="INSERT INTO a7732991_1,Register(subject, number, customer_mail, detail)VALUES('$subject', '$number', '$customer_mail','$detail)";
$result=mysql_query($sql);
if($sql){
echo "Successful2";
}
else {
echo "ERROR2";
}
// if successfully insert data into database, displays message "Successful".
if($result){
echo "Successful";
echo "<BR>";
echo "<a href='insert.php'>Back to main page</a>";
}
else {
echo "ERROR";
}
// close connection
mysql_close();
?>