View Single Post
  #2   Spotlight this post!  
Unread 18-06-2004, 23:29
LBK Rules's Avatar
LBK Rules LBK Rules is offline
1467 '06 Alumni
AKA: Anthony Rinaldi
no team (HSRO)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Henrico, VA
Posts: 438
LBK Rules will become famous soon enoughLBK Rules will become famous soon enough
Re: ODBC SQL Problem

Ok, I have figured it out, with the help of my dad.

I didn't include single-quotes ( this ' ) around the varibles that might have spaces in it.

Example:

PHP Code:
$sql="INSERT INTO Sellers (Username, Password, LastName, FirstName, Address, City, State, ZIP, Phone, EMail) VALUES ('" 
$UserName_TextBox "', '" $Password_TextBox "', '" $LastName_TextBox "', '"  $FirstName_TextBox "', '"  
$Address_TextBox "', '"  $City_TextBox "', '"  $State_TextBox "', '"  $ZIP_TextBox "', '"  $Phone_TextBox .
"', '"  $EMail_TextBox "')"
PHP Code:
$Address_TextBox 
would not work, but
PHP Code:
$rest_of_sql1 ", '" $Address_TextBox "', " $rest_of_sql2 
would.

I hope this helps somebody.
__________________
Anthony Rinaldi
Team 1132: 2003
Team 1467: 2004 - 2006