Okay… So I’m a HTML/CSS/PHP/MySQL newbie. I’m attempting to “convert”, so to speak, 5 HTML files to 1 PHP file.
I have 1 HTML so far, with a drop down box of 5 choices.
Choice 1 Choice 2 Choice 3 Choice 4 Choice 5
<input type="submit" value="Go"> </form></body></blockquote>
I have 5 additional HTML files respectively named Choice 1, 2, 3, 4, and 5.
I have 1 PHP file, named “test.php” with the following code:<?php
$choice = $_GET['choice']; if ($choice == 1) $value = Choice1.html; else if ($choice == 2) $value = Choice2.html; else if ($choice == 3) $value = Choice3.html; else if ($choice == 4) $value = Choice4.html; else $value = Choice5.html; ?> <?php echo($value); ?></blockquote>
Now. I know that the PHP code is wrong. Whenever I click on a choice from the drop down box, the parser is obviously just returning text. I do not want this. I want the code from inside the desired HTML file. I don’t know how to do this.
I would be extremely (and I mean that!) grateful if you could help me out on this. I know its probably something so straight forward but I cannot seem to grasp it…
Looking forward to hearing from you.