On Sunday 10 February 2002 00:47, [EMAIL PROTECTED] wrote:
> I'm trying to set up a "modify record" page, and after testing and
> triple-checking the syntax and form, and even running the query in the
> phpMyAdmin interface to make sure the query is correct.
>
> This is just a snippet of what I've done:
>
> <?php
>
> // open connection
> include ("connectdatabase.inc");
>
> // format names to protects the O'Haras etc.
> $esc_fname = addslashes($fname);
> $esc_lname = addslashes($lname);
> $esc_email = addslashes($email);
> $esc_web = addslashes($web);
>
> // set up query
> $sql = 'UPDATE thistable
>               SET FNAME = "$esc_fname", LNAME = "$esc_lname", EMAIL
> = "$esc_email", WEB = "$esc_web"
>               WHERE ID = "$id"';

If you print/echo $sql at this point you'll (hopefully) see where you're 
going wrong.


If you don't see what you're doing wrong then swap your single quotes for 
double quotes and vice-versa.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The Killer Ducks are coming!!!
*/

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

Reply via email to