Laugh...? I nearly wet mesen...!

Jason. Thanks very much. Truly...! I looked at it, stared at it, growled at
it and then finally realised about 30 seconds before I raed your post:

SET Comments='$Comments',

What an idiot...!

Hey - thanks for your patience mate.

I don't suppose you'd care to help me with controlling document types for
uploading would you...? I have a field that accepts files but don't want
some idiot uploading an executable - I doubt my hosting provider would be
too chuffed with that at all.

-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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