PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi. This is probably a baby question but please help me. I have an html file that has a form for choosing a city from a drop down list of states/cities. When the city(option) is chosen, say for example, Phoenix, I want the php file to link to a html file Phoenix.html. I don't understand how to use the php file to take the information from the form, and process it, say, using an IF statement to link it to a different file (depending on the result of the IF statement). I highlighted the area that I think I need code. Any help will be appreciated. Thanks.
<html>
<body>
<?php
$page_title = 'Family Cities';
require(states.html);
$city = $_POST['city'];
if($city == 'Phoenix'){
[color=#FF0000]//what would go here to open Phoenix.html???[/color] }
?>
</body>
</html>