$connect = mysql_connect("localhost","root","bank1991");
$select_it = mysql_select_db("shalom presbyterian church",$connect);

$full_name = mysql_real_escape_string($_POST['fullname']);
$Phone_number = mysql_real_escape_string($_POST['pnumber']);
$Email_address = mysql_real_escape_string($_POST['emailAddress']);
$Comment_Questions = mysql_real_escape_string($_POST['feedback']);

$addquery = "INSERT INTO contact_feedback(full_name,Phone_number,Email_address,Comment_Questions) 

if($addStaff = mysql_query($addquery,$connect)){
echo "Feedback have been successfully sent <br>";
echo "<a href = \"contact.html\">Back to admin home.</a>";
echo "Sorry, Failed to send. Please try again by adding the correct details <br>";
echo "<a href = \"http://localhost/Shalom Presbyterian Church/contact.html
\">Please Try Again.</a>";



i am having problem inserting into my database(mysql)
it does not insert into the database there returning the second echo message
i dnt know what am doing wrong. i would appreciate the help please

Recommended Answers

maybe it's because of a missing closing parenthesis on the VALUES part? :3

Jump to Post

All 3 Replies

maybe it's because of a missing closing parenthesis on the VALUES part? :3

Hello Benjamin,


$addquery = "INSERT INTO contact_feedback(full_name,Phone_number,Email_address,Comment_Questions) VALUES ('$full_name','$Phone_number','$Email_address','$Comment_Questions')";

and watch for the closing brackets !


@athelas thanx it worked!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.