php and my sql - TechRepublic
General discussion
March 9, 2005 at 09:51 PM
my_socks_are_dirty

php and my sql

by my_socks_are_dirty . Updated 21 years, 4 months ago

first of all here is the php code:
http://pastebin.com/251806

Ok, I have the page sorta working after squishing some bugs, i’m left with an anomoly i can’t figure out….

If i try to enter text with no spaces into the text boxes and submit, i get this error:

Error adding client data: Unknown column ‘asdf’ in ‘field list’
(asdf is the text i entered into the first box)

if i enter text with spaces:

Error adding client data: You have an error in your SQL syntax near ‘sdfs,sdfsd sdfsd,sdf sdfds)’ at line 1

However, if i enter numbers with no spaces it works. If i enter numbers with spaces:

Error adding client data: You have an error in your SQL syntax near ‘654546,5621 654 654,65321 4687)’ at line 1

any help would be appreciated

This discussion is locked

All Comments