[PHP] Remembering which option in a SELECT tag the user had chosen

2003-01-28 Thread Webapprentice
Hi, I have a SELECT on a web form. Friday August 22, 04:00 PM - 06:00 PM Friday August 22, 06:00 PM - 08:00 PM Friday August 22, 08:00 PM - 10:00 PM Friday August 22, 10:00 PM - 12:00 AM Saturday August 23, 12:00 AM - 02:00 AM Saturday August 23, 12:00 PM - 02:00 PM Saturday August 23, 02:00 PM -

Re: [PHP] Remembering which option in a SELECT tag the user had chosen

2003-01-29 Thread Webapprentice
Hi John, I was thinking of inserting a check on each option, but I thought there had to be a different way. I've received ideas of storing the option values in an array and creating a function to generate that dropdown by grabbing values out of the array, so I want to go with that because that i

[PHP] if (a == b) ...

2003-01-29 Thread Webapprentice
Hi, I have a conditional: if (a == b) a is the number 0, but b is a string "Friday August 22". The condition is evaluating as true, which is not what I want. What am I misunderstanding? Thanks, Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

Re: [PHP] if (a == b) ...

2003-01-29 Thread Webapprentice
Cal, Thanks for the suggestion. I looked up equality on www.php.net, and there are many comments about how == works. I also found out === works too, or is that still lazy? Thanks, Stephen Cal Evans wrote: Stephen, "Friday August 22" evaluates to the number 0. (check the docs for intval()) The

[PHP] Checking the season

2002-01-04 Thread webapprentice
Hi, Just need a sounding board to help me think this through. I want to check the current date to determine what "season" it is and display the appropriate picture. I define spring as 03/21/, summer as 06/21/, autumn as 09/21/, and winter as 12/21/. I form a string for the cur

Re: [PHP] Checking the season

2002-01-05 Thread webapprentice
I'll have to use and if/elseif construct, because I don't believe a switch() constructs cases can take expressions, can it? - Original Message - From: "Bogdan Stancescu" <[EMAIL PROTECTED]> To: "webapprentice" <[EMAIL PROTECTED]> Cc: <[EMAIL

Re: [PHP] Checking the season

2002-01-05 Thread webapprentice
t's was a lot longer than what is here.) - Original Message - From: "Tom Rogers" <[EMAIL PROTECTED]> To: "webapprentice" <[EMAIL PROTECTED]>; "Bogdan Stancescu" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, Januar

[PHP] Variables within a string

2002-03-10 Thread webapprentice
Hello, When I try to do this: $foo = "Entry for for $HTTP_POST_VARS[\"name\"]"; I receive this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' on line X Why does it do this, and how do I get around this, besides assigning the value of $HTTP_POST_VARS[\"na

[PHP] Re: Variables within a string

2002-03-11 Thread webapprentice
Oh, so that's how you deal with indexed variables inside of double quotes... I can't believe that has eluded me for so long... --- From: Jason Wong <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Mon, 11 Mar 2002 12:09:

[PHP] Double quotes in form fields and submitting them

2002-03-22 Thread webapprentice
Hi, I have a form with a text field, say userName. I put a value in that has double quotes (i.e. "foobar") and submit this form. On output I have this: The output ends up being a \. How do I keep the double quotes? Thanks, Stephen

Re: [PHP] Double quotes in form fields and submitting them

2002-03-23 Thread webapprentice
Hi, "foobar" becomes simply \ I've lost foobar AND the double quotes. Is there a way to keep them all? --Stephen - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: "webapprentice" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTE

[PHP] The infamous HTML quotes Re: [PHP] Double quotes in form fields and submitting them

2002-03-23 Thread webapprentice
entities($HTTP_POST_VARS["realName"])); or stripslashes(htmlspecialcharacters($HTTP_POST_VARS["realName"])); Thanks for your help in leading me to the right direction. - Original Message - From: "Miguel Cruz" <[EMAIL PROTECTED]> To: "webapprentice"

[PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread webapprentice
Is there any PHP function that works like ColdFusion's location tag? After a certain execution, I wish to leave the current PHP page entirely and go to another page. Is this possible? I'm scouring the help stuff and am still digging for answers. Thanks.

Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread webapprentice
don't want a person refreshing the page and causing the PHP page to submit again. Thus, is there something else I can do? Or am I just not seeing this? Thanks, Stephen - Original Message - From: "James" <[EMAIL PROTECTED]> To: "webapprentice" <[EMAIL PROTECTE

Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread webapprentice
aders (since the PHP processor probably translates whitespace as echo/print statements). Thanks. --Stephen - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> To: "webapprentice" <[EMAIL PROTECTED]> Cc: "James" <[EMAIL PROTEC

Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-27 Thread webapprentice
the whitespace, and I was fine. Thanks for clarifying all this. Sincerely, Stephen - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> To: "webapprentice" <[EMAIL PROTECTED]> Cc: "James" <[EMAIL PROTECTED]>; "Jason M