Jump to content

Vultima

New Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vultima's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?php $con = mysql_connect("localhost","root","rhysrhys"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("hagidolls", $con); $sql="INSERT INTO `orders` (Firstname, surname, telephone, email, title, description) VALUES ('$_POST[name]','$_POST[lname]','$_POST[tele]','$_POST[mail]','$_POST[title]','$_POST[descriptions]')"; echo $sql; //if (!mysql_query($sql,$con)) // { //die('Error: ' . mysql_error()); //} //echo "Order Has been Submitted, Being Redirected in 5 Seconds"; mysql_close($con); ?> Also this is page where the form is <form action="admin/insertorder.php" method="post"> <p>First Name: <input type="text" name="name" /><br /> Last Name: <input type="text" name="lname" /><br /> Telephone: <input type="text" name="tele" /><br /> Email: <input type="text" name="mail" /><br /> <br/> Artwork Title: <input type="text" name="title" /><br /> <br/> Description of what you would like to be made..<br> <textarea type="text" onKeyPress="return taLimit(this)" onKeyUp="return taCount(this,'myCounter')" name="descriptions" rows=7 wrap="physical" cols=40> </textarea> <br><br> You have <B><SPAN id=myCounter>2000</SPAN></B> characters remaining for your description...</font> <br/> <br/> <input type="submit" /> </form>
  2. Hi that didn't seem to work, first i changed the name to orders, didn't work, then i added the ` to it and same result INSERT INTO `orders` (Firstname, surname, telephone, email, title, description) VALUES ([redacted])
  3. Hi I did as you said and got the result of INSERT INTO order (Firstname, surname, telephone, email, title, description) VALUES ([redacted])
  4. WOW I posted that terribly, heres what I meant.. Hi I am in process of doing a PHP script, my other one works fine, I put them both in below, however i get this error. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order (Firstname, surname, telephone, email, title, description) VALUES ('Stef' at line 1 The code I am using for this section is <?php $con = mysql_connect("localhost","root","rhysrhys"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("hagidolls", $con); $sql="INSERT INTO order (Firstname, surname, telephone, email, title, description) VALUES ('$_POST[name]','$_POST[lname]','$_POST[tele]','$_POST[mail]','$_POST[title]','$_POST[descriptions]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Order Has been Submitted, Being Redirected in 5 Seconds"; mysql_close($con); ?> The database tables I am using are idorder, Firstname, surname, telephone, email, title, description
  5. Hi I am in process of doing a PHP script, my other one works fine, I put them both in below, however i get this error [code]Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order (Firstname, surname, telephone, email, title, description) VALUES ('Stef' at line 1 The code I am using for this section is <?php $con = mysql_connect("localhost","root","rhysrhys"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("hagidolls", $con); $sql="INSERT INTO order (Firstname, surname, telephone, email, title, description) VALUES ('$_POST[name]','$_POST[lname]','$_POST[tele]','$_POST[mail]','$_POST[title]','$_POST[descriptions]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Order Has been Submitted, Being Redirected in 5 Seconds"; mysql_close($con); ?> [/code] The database tables I am using are idorder, Firstname, surname, telephone, email, title, description
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.