Advertisement

03.17.2008 at 04:44AM PDT, ID: 23246666
[x]
Attachment Details

Help Setting up MySQL Web Form

Asked by ajsmisc in MySQL, PHP Scripting Language, PHP and Databases

Tags: MySQL & PHP, www.jayne-sells.com/pages/form.html

OK, I'm just creating the table that the webform will eventually be sending data to (if I can get it setup). The form I'm going to use is located here: www.jayne-sells.com/pages/form.html (I know it's not PHP, yet)

Anyways, I'm trying to create the table with PHPmyAdmin and I'm getting an error. Here's the MySQL Query that it built for me:

CREATE TABLE `accordi1_samples`.`samples` (`First Name` VARCHAR(25) NOT NULL, `Last Name` VARCHAR(30) NOT NULL, `Title` VARCHAR(60) NOT NULL, `School District` VARCHAR(75) NOT NULL, `Phone` VARCHAR(15) NOT NULL, `Email` VARCHAR(50) NOT NULL, `Subjects` SET('SS','MA','SC','RT','VO','CO','WR','PH',DI','OT') NOT NULL, `Publishers` SET('NG','BR','HE','CL','MR','RB','DO','UN') NOT NULL, `Purchase Date` TEXT NOT NULL, `Comments` TEXT NOT NULL, `Heard About` ENUM('web','pub','teach','conf','other') NOT NULL, `Date` DATETIME NOT NULL, INDEX (`Last Name`, `School District`, `Phone`, `Email`)) ENGINE = MyISAM COMMENT = 'stores sample request info'

Now, here is the error message that I got:

#1064 - 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 'DI','OT') NOT NULL, `Publishers` SET('NG','BR','HE','CL','MR','RB','DO','UN') NO' at line 1


Please look at the code that I have written in for each of the values on the HTML page. I used those to come up with the values for the table. I think that's how I'm supposed to do it anyway? Can someone help me out with this? It would be nice to get this form up and running.

PS - I'm going to need help setting up the PHP page to make sure the data gets put where it's supposed to be!

Thanks in advance!Start Free Trial
[+][-]03.17.2008 at 05:53AM PDT, ID: 21141659

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MySQL, PHP Scripting Language, PHP and Databases
Sign Up Now!
Solution Provided By: cedlinx
Participating Experts: 1
Solution Grade: B
 
 
[+][-]03.18.2008 at 06:50PM PDT, ID: 21157850

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628