Re: Stuffing those damn values into their fields...!

From: Date: Mon, 19 Jul 2004 16:20:33 +0000
Subject: Re: Stuffing those damn values into their fields...!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-191029@lists.php.net to get a copy of this message
I would try echoing out the $UserDataDump variable to see what your query text is. PHP does not parse what's in single quotes, so your variables may not be getting substituted with values. Try something like this: $UserDataDump = 'UPDATE MembersData SET Title="'.$Title.'") WHERE UserID="'.$_POST[Hidden].'"'; ...or escaping the quotes... $UserDataDump = "UPDATE MembersData SET Title=\'$Title\') WHERE UserID=\'$_POST[Hidden]\'"; On Jul 19, 2004, at 11:54 AM, Justin Patrin wrote:
On Mon, 19 Jul 2004 13:22:45 +0100, Harlequin <michael.mason@arraspeople.co.uk> wrote:
OK. So here we have on the submission form: <input type="hidden" value="$_SESSION['logname']" name="Hidden">
Your problem is likely here. What exactly are you doing with this string? echo? print? ?> <? It is surrounded by single or double quotes? Try this: echo '<input type="hidden" value="'.htmlentities($_SESSION['logname']).'" name="Hidden">';
It echoes fine, so I know it's there. When I go to the target page it echoes fine there also and doesn't return an error. But more strangely, it doesn't perform the update I request: $UserDataDump = "UPDATE MembersData SET Title='$Title'...) WHERE UserID='$_POST[Hidden]'"; What's missing...? No error, no update...? No caffiene...! Help...! Oh - is OK, I have my Nicotine :)
-- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#191029) next »