# PHP homework



## GSquadron (Apr 18, 2011)

Hi all guys!
I got a new homework about php, but simply i don't know how it is done! 
I got stuck at some point:
we should make a button which opens a page for the people who choose "adult" in radiobutton
and one other page for the people who choose "infant".
Anyone can help me?


----------



## Brandenburg (Apr 18, 2011)

i would google it if it was me..always worked for me in the past when i needed to know how to do something in whatever language i was working on.... find a few code snippets and go from there....  never done php so i had to google it to find a few code examples to get an idea.. doesn't look too terribly difficult...


----------



## caleb (Apr 18, 2011)

If you are looking for a way to redirect I think it was header() in PHP or window.location() in js.
http://php.net/manual/en/function.header.php


----------



## W1zzard (Apr 18, 2011)

you make a web page with a form on it that has your input elements, submit the form to a php page where you take the input from $_GET or $_POST and do the right thing


----------



## GSquadron (Apr 18, 2011)

I know $_GET and post, but it is another webpage 
It means if $_GET=="female.com"?? else $_GET=="male.com"?


----------



## W1zzard (Apr 18, 2011)

read up on html forms.

when a form is submitted, it sends the form data to an url specified in the <form> tag. make that a php page and your php script sees the form input in either $_GET or $_POST depending on "method" in <form>

all this is documented pretty well, just need to read


----------

