Hi,
I started on a small personal project to write a simple help-wizard for the visitors of my website.
In the first php-file I am showing them 2 or more options (radio buttons) in a form where they can choose the situation that is applicable to them.
for example:
$option1: looking for personal subscription
$option2: looking for business subscription
I created a second php-file (to show the results of the form-action).
I used the if and else function to display a different message in the 2nd php-file, depending on the selected option (1 or 2) by the visitor in the 1st php-file.
Problem is that my program always shows the text which belongs to option 2. Also if option1 was selected.
The form in my 1st php-file looks like this:
<form action="results.php" method="post">
Select the option which is applicable to you:
<input type="radio" name="subtype" checked value="option1"> <? echo $option1; ?><br>
<input type="radio" name="subtype" value="option2"> <? echo $option2; ?> <br>
<input type="submit" value="Proceed-->">
My if/else statements in the 2nd php-file (results.php) look like this:
<?
if (value=="option1") {
echo "<b>You selected that you are looking for a personal subscription</b>";
}
else {
echo "<b>You selected that you are looking for a business subscription</b>";
}
?>
I hope someone could help me out, since I am just starting with PHP. I do know that I can put this script in a single file by using showform(), but I'm just experimenting to get this little program to work.
regards,
John