On 20/02/11 21:37, Nazish wrote:
Issue resolved!
It turned out to be the use of quotations. Instead of double quotations to
surround the $insert variable, it worked with single quotations:
$insert = ' INSERT INTO user_info
(login,password)
VALUES
("'.$login.'", "'.$password.'") ' ;
With the real_escape_string, this version worked (double quotation on the
outside, single quotation on the inside):
( " '.mysql_real_escape_string($login).' ", "
'.mysql_real_escape_string($password).' ")';
I'm not sure why the use of quotations works differently in different cases?
Thanks for your insights! It really helped with diagnostics. Much
appreciated!
Nazish,
Find yourself an editor or development environment that does source code
highlighting - this sort of error will be very obvious in such a program.
I'm not going to recommend one - that's a sure way to start an argument - but
I use Netbeans.
Cheers
Pete
--
Peter Ford, Developer phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd. www.justcroft.com
Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php