Jason.

Thanks for pointing out the obvious - I should have trapped errors. Thanks
you.

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";
?>

Any ideas Jason...?

-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sunday 11 July 2004 08:33, Harlequin wrote:
>
> > I'm hitting the submit button at the bottom of the page and getting
> > redirected OK to the next page with no errors but when I query the
database
> > directly it isn't updating.
>
> Should you be getting errors if there is a problem? IOW *are* you putting
in
> any error checking code?
>
> In the code that you posted you are not performing any validation checks
on
> the data sent by the user - this is BAD. You should fix that before you go
> live with your site.
>
> You assigned your query to $sql - this is good, but did you print it out
so
> that you can verify the query is what you expected it to be? One of the
first
> rules of debugging is to gather as much info as possible. Which means
> printing out every variable of significance.
>
> When developing your code ALWAYS enable full error reporting and display
> errors (or if you prefer log them and read the log).
>
> -- 
> 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
> ------------------------------------------
> /*
> Clothes make the man.  Naked people have little or no influence on
society.
> - Mark Twain
> */

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

Reply via email to