please help

I’m a newbie and i desparately need help with this script. I’m learning as much as i can but this script i’ve been working on for a month is driving me CRAZY. Can anyone tell me why this script is not posting to mysql database like it supposed to? and i get no error message when i feel the form and click submit! the HTML form is here: http://www.bookzella.com/index_files/post.html.

<?php $name=$_POST['name']; $email=$_POST['email']; $phone=$_POST['phone']; $title=$_POST['title']; $author=$_POST['author']; $isbn=$_POST['isbn']; $university=$_POST['university']; $condition=$_POST['description']; $price=$_POST['price']; $hostname = "localhost"; $username = "whereisit"; $password = "righthere"; $usertable = "mytable"; $dbName = "mydeb"; if ($submit) { MYSQL_CONNECT($hostname, $username, $password) OR DIE("DB connection unavailable"); @mysql_select_db($dbName) or die( "Unable to select database"); $sql = "INSERT INTO books (name, email, phone, title, author, isbn, university, description, price) VALUES"."(". "'".$_POST['name']. "','".$_POST['email']. "','".$_POST['phone']. "'".$_POST['title']. "','".$_POST['author']. "','".$_POST['isbn']. "','".$_POST['university']. "','".$_POST['description']. "','".$_POST['price']. "')"; $result = mysql_query($sql) or die("Could not insert your book and contact info to bookzella.com because ".mysql_error()); if($result){ echo "You Textbook and Contact Info Have Been Posted to Bookzella.com Database!

Thank You."; } mysql_close(); ?>

Don’t double post. It just makes people want to not help you.

Locked…

Sponsor our Newsletter | Privacy Policy | Terms of Service