[PHP] about $_post
Hi, I just want to learn if there is any differen between $_POST[ID] and $_POST['ID'] ..If there is.. does it cause a problem ?.. thanks meltem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] about $_post
Yes. $_POST[ID] Since there are no quotes around the variable name ID and no dollar sign in front of it, PHP will look for a constant named ID and if one is not found it will blow chow. $_POST['ID'] Should work find, assuming a variable named ID came from your form. However, I wouldn't get in the habit of writing my arrays like this. It's confusing to say the least. =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 6:35 AM To: [EMAIL PROTECTED] Subject: [PHP] about $_post Hi, I just want to learn if there is any differen between $_POST[ID] and $_POST['ID'] ..If there is.. does it cause a problem ?.. thanks meltem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about $_post
$_POST[ID] Since there are no quotes around the variable name ID and no dollar sign in front of it, PHP will look for a constant named ID and if one is not found it will blow chow. Depending on your error_reporting() level whether this warning is reported or not. Better to not use this method, though. $_POST['ID'] Should work find, assuming a variable named ID came from your form. However, I wouldn't get in the habit of writing my arrays like this. It's confusing to say the least. What habit would you recommend? This is the way to do it. Not sure why the spaces are there, but without them, this is the way you should write your arrays. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php