|
|
 |
RE: FN-FORUM: php "coding style"
date posted 21st November 2006 12:41
>>$query = "SELECT * from users where username = '$_POST['username']'";
>>Obviously you can see here how the quotes will cause a problem, unless
>>you break 'out' of that query. Whilst most code will work fine
>>without quotes - PHP figures this out for you, it's not clean, but it
>>can save you a bunch of time.
>>
>>You can fix the errors if you want, otherwise just test it thoroughly
>>then add a:
>>
>>error_reporting(0);
>>
>>to the top of the page and forget all about it. Entirely your choice.
>>Rich.
Cheers Rich,
Is it possible that this warning is just a red herring then? I understand
the quoting side of things, - My problem is that Apache won't run the code;
it seems to be demanding the quotes be in place - I'm kind of hoping that
it's a simple php.ini flag, but I could be way off track.
(if it helps...
[EMAIL REMOVED] include]# php --version
PHP 5.1.6 (cli) (built: Nov 2 2006 16:46:15)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
[EMAIL REMOVED] include]#
)
D
|
 |
|