-
Form HELP! +rep
Hi, do you know how i can make a Radio Button, where you check the box, click submit, and take you to a page of the product you selected?
+rep to whom would give the script to me.
Edited by Lµke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks :).
-
anywho i dont get this, what do you want, i cannot understand im three qaurters brazillian,
-
Radio Buttons Form example
Code:
<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
Select an option:<BR>
<INPUT type="radio" name="option"> Option 1
<INPUT type="radio" name="option"> Option 2
<INPUT type="radio" name="option"> Option 3
<INPUT type="Submit" VALUE="Submit">
</FORM>
Unsure what you mean after that.
P.S i helped with your forum query too.
-
Yeah and when u select one of those options, it leads to 'cgi-bin/example.cgi' right? I want the script for 'cgi-bin/example.cgi' so that the option u selected pears on that page after submitting?
-
-
Right. I wanna make a form, where you select an option. When you check the box and click submit, it takes you to a webpage instead of a thanks page, it's a page of what you've selected. Now u get it?
-
Make this selected.php
Code:
<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>
Call this selected.php
Code:
<?php
echo "You Selected: $option"
?>
Tested And Works!
-
oh ok but the code above works, i think.
-
Exactly what i wantted but it doesn't show.. it says 'You Selected:' and thats it.
http://www.host.direct-hosts.net/badges/select.php
-
http://www.clubbinghabbos.net/ash/options.php - Works for me
Edit: it has to be called Selected not select.
You can change this in the options.php file