You have to enclose the data in quotes or it cuts off at the first space. Example:
$resultID = mysql_query("INSERT INTO data_table (name, address) VALUES ($name, $address)",$connect); This will cut off the text at the first space in the text field This is the method that worked for me: $resultID = mysql_query("INSERT INTO data_table (name, address) VALUES ('$name', '$address')",$connect); //notice the quotes I am assuming that the $name and $address are coming from a form. Hope this helps Jon -----Original Message----- From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 9:04 AM To: [EMAIL PROTECTED] Subject: text data cut off at space Ben, Monday, March 04, 2002, 7:48:45 AM, you wrote: BB> I am very new at using MySQL, so this may be a stupid BB> question. in my webpage front end, a user logs in, BB> and I pass his username to the form throught a hidden BB> form. The only problem is that the user name are all BB> "FirstName LastName". It passes from the login page BB> to the php page fine, but once the user enters more BB> input data in that php page, and the php page just BB> reloads itself when the user submits, the username BB> gets cut off at the first space. What's going on? BB> thanks Have you inserted first and last name into one field, like 'John Johnson'? What is the type of your field that consists of first and last name? If you insert value of more than maximum column's length into CHAR or VARCHAR column, the value is curtailed to fit. BB> Ben -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php