View Single Post
  #3 (permalink)  
Old 06-30-06, 12:04 PM
breenthemachine breenthemachine is offline
New Member
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by UnrealEd
try echoing the query before entering it into mysql. most of te time you'll see what's wrong

just a small note: if you are going to allow user's to create a table, i don't think that's very wise: it is better to do it yourself, for security reasons.

Show me the query, and i'll see what's wrong
UnrealEd
I totally understand the severity in security. Actually, this is not for users to use, its for my use. Im trying to teach myself PHP, since that is one language on my list to learn, and I have a book telling me to enter this code, and obviously, the book is wrong. I have checked over the code mulitple times to verify if i have what the book has, and I even tried using previous programming knowledge to see if I could figure out the error. I dont know if this is what you wanted but I put this line

PHP Code:

echo "$sql"
and commented out the execution statement. This is the result I get when its ran.

CREATE TABLE)
Adding table to testDB...

I double checked everything to try to see if the syntax is correct and I guess if there is a mistake, im just not that PHP savvy to find it. Thanks for your help.
Reply With Quote