Yeah but not both of them cant be called selected.php
Printable View
Yeah but not both of them cant be called selected.php
If it doesnt work, try changing the selected.php file to
PHP Code:<?php
$option = $_POST['option'];
echo "You Selected: ".$option;
?>
options.php
selected.phpCode:<html>
<head>
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: small;
}
-->
</style>
</head>
<body>
<form action="selected.php" method="post" class="style1">
<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
Options Avaliable: <br />
<INPUT type="radio" name="option" value="Number 1"> Number 1<BR>
<INPUT type="radio" name="option" value="Number 2"> Number 2<BR>
<INPUT type="radio" name="option" value="Number 3"> Number 3<BR>
<br />
<input type="submit" value="Select" />
</form>
</body>
</html>
This code has changed from the one i posted 10 mins ago. Sorry for any inconvience.Code:<?php
echo "You Selected: $option"
?>
Thanks th0m4s. +rep it works now.
And thanks Drompo. +rep for script.
@ thomas
Yeah but don't i need to change anything 'selected.php' to make all the chekboxs that a person has selected appear? I tried to cheak all boxs and only 1 appears.
see http://www.host.direct-hosts.net/tests/options.php