On Sunday 11 July 2004 09:00, Harlequin wrote:

> I did as you suggest and I get a rather generic response:
>
> Sorry, Your Request Could Not Be Executed: 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 'Little About Me..., FurtherComments=Nothing
> To Tell about me.,
>
> My code now on the 2nd page (once the submit button has been hit) is:
>
> <?php
>   $UserID=      $_POST['TXT_UserID'];
>   $Comments=        $_POST['TXT_Comments'];
>    $FurtherComments= $_POST['TXT_FurtherComments'];
>   $UserMail=        $_POST['TXT_UserMail'];
>   $CV=              $_POST['TXT_CV'];
>    $sql = "UPDATE RegisteredMembers SET Comments=$Comments,
> FurtherComments=$FurtherComments, $UserMail=UserMail, DocumentData=$CV
>   WHERE UserID='$_POST[TXT_UserID]'";
>   $result = mysql_query($sql) or die ("Sorry, Your Request Could Not Be
> Executed: " . mysql_error());
>   echo "$sql";
> ?>

The obvious first thing to do is to put quotes (') around the data when you're 
using a text field.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Seeing is deceiving.  It's eating that's believing.
                -- James Thurber
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to