| Code: |
| <html>
<head> <title>test.php</title> </head> <body> <?php if ($page=="one") echo "<h2>Test One</h2> <P>TESTINGTESTING</p>"; elseif ($page=="two") echo "<h2>Test Two</h2> <p>TESTING2TESTING2TESTING2</p>"; else echo "<h1>Main</h1> <p>Mainmainmainmainmain</p>"; ?> </body> </html> |
This is my basic code I'm using on my page. When the url reads "test.php?page=two" it should show whats under that within the code. However it shows the default text (Main). This code worked on another server but doesnt work here. I don't know much about php so maybe theres something I have wrong here. Could you tell me whats going on?
