If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

What is wrong with this script?

OK, it's a baby step for me...

what is wrong with these scripts?
I have two files, wish.php and day.php

wish.php collects the data (day of the week) and day.php should kick a response depending on what you entered. I set it to respond "Get back to work, you lazy bum!", if you enter "Sunday" and, supposedly "You need a vacation..." if you enter something else.

I am getting a responce "Get back to work, you lazy bum!" no matter what I enter.

Edited: just for giggles, I also tried not removing it, but putting
$day = ""; instead, and I got identical bad results with "you need a vacation". The link above has day.php without that line altogether.

I'm trying to understand why it works (or should I say, doesn't) this way?...

granted I've never used checkboxes in a form, but this is how I would imagine they work
EDIT:
when learning php, its sometimes better to use GET rather than POST, since you can see what arguments the php script is recieving

as a side note, if both of those checkboxes were checked, it would show as sunday i believe, since its the last thing in your code chronologically, i would suggest using radio buttons for something like that in the future, since you hypothetically wouldn't want someone to wish it was both monday & sunday

With use the GET statement he meant that you should replace POST with GET if you're still learning PHP.
It makes the variables your sending appear in the address bar.
For example the user types "Sunday"

one more thing that you should look out for:
you code responds with "Get back to work, you lazy bum!"
If day == "Sunday"
but if the user types "sUnday" "sunday" "SUNDAY" "sUNDAY" " Sunday" "Sunday " etc.. they will stil get the "You need a vacation..." response. PHP is case- and space-sensitive when it comes to strings and variables.