lord unforgiven
New member
i have a radio button in html and i want the different php scripts to be displayed depending on what radio button is chosen like
<html>
<body>
<input type="radio" name="radio1" value="php1/> php1
<input type="radio" name="radio1" value="php2/> php2
<?php
$radio1 = ($_POST["radio1"]);
if ($radio1 == "php1"){
echo "php1";
}
if ($radio1 == "php2"){
echo "php2";
}
?>
</body>
</html>
that was just a quick code i typed out of my head the code i am working with atm is
<html>
<body>
<input type="radio" name="display" value="c"/> display
<input type="radio" name="display" value="a"/> display
<input type="radio" name="display" value="d"/> display
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="submit" value="Submit" name="submit"/>
<?php
$display = ($_POST["display"]);
if (isset($_POST["submit"])) {
if ($display == "a" ) {
echo "hello";
echo '<html> <body><input type="radio" name="wow" calue="o"/> heojsgs </body> </html>';
}else{
echo "error";
}
}
?>
</body>
</html>
and im trying to get it to work so i can use it on an even bigger php code
<html>
<body>
<input type="radio" name="radio1" value="php1/> php1
<input type="radio" name="radio1" value="php2/> php2
<?php
$radio1 = ($_POST["radio1"]);
if ($radio1 == "php1"){
echo "php1";
}
if ($radio1 == "php2"){
echo "php2";
}
?>
</body>
</html>
that was just a quick code i typed out of my head the code i am working with atm is
<html>
<body>
<input type="radio" name="display" value="c"/> display
<input type="radio" name="display" value="a"/> display
<input type="radio" name="display" value="d"/> display
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="submit" value="Submit" name="submit"/>
<?php
$display = ($_POST["display"]);
if (isset($_POST["submit"])) {
if ($display == "a" ) {
echo "hello";
echo '<html> <body><input type="radio" name="wow" calue="o"/> heojsgs </body> </html>';
}else{
echo "error";
}
}
?>
</body>
</html>
and im trying to get it to work so i can use it on an even bigger php code