[PHP] Re: script not stopping
On Mon, Jul 07, 2003 at 03:28:27PM -0600, Micah Montoy wrote: if ($_POST[imgList] = ){ You're *assigning* a variable in this condition. -- Paul Chvostek [EMAIL PROTECTED] it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script not stopping
How do I specify it that I just want to check to see if the form field was blank and if so, inform the user? I know I could do this with JavaScript but I need to be able to do correct conditions. thanks Paul Chvostek [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Jul 07, 2003 at 03:28:27PM -0600, Micah Montoy wrote: if ($_POST[imgList] = ){ You're *assigning* a variable in this condition. -- Paul Chvostek [EMAIL PROTECTED] it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script not stopping
try that if (!isset($_POST[imgList]) || empty($_POST[imgList])){ for the comparison. Thomas On Mon, 7 Jul 2003 16:02:21 -0600 [EMAIL PROTECTED] (Micah Montoy) wrote: How do I specify it that I just want to check to see if the form field was blank and if so, inform the user? I know I could do this with JavaScript but I need to be able to do correct conditions. thanks Paul Chvostek [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Jul 07, 2003 at 03:28:27PM -0600, Micah Montoy wrote: if ($_POST[imgList] = ){ You're *assigning* a variable in this condition. -- Paul Chvostek [EMAIL PROTECTED] it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script not stopping
Paul Chvostek [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Jul 07, 2003 at 03:28:27PM -0600, Micah Montoy wrote: if ($_POST[imgList] = ){ You're *assigning* a variable in this condition. On Mon, Jul 07, 2003 at 04:02:21PM -0600, Micah Montoy wrote: How do I specify it that I just want to check to see if the form field was blank and if so, inform the user? if ( !isset($_POST[imgList]) ) { } or if imgList is a text string, you could safely punt with: if ( $_POST[imgList] == ) { } I know I could do this with JavaScript but I need to be able to do correct conditions. What do you mean by correct? Why can't you do this in JS? (Note that even if you do it in JavaScript, you should *still* do it in PHP, to support all browsers. These days, quite a few corporate networks force web traffic through proxies that block JavaScript, cookies and sometimes even Flash.) -- Paul Chvostek [EMAIL PROTECTED] it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php