<html>
<body>
<form action="form1.htm"method="get">
<input type="radio"name="one">Choice One
<input type="radio"name="one">Choice two
<input type="submit"value="Check">
</form>
</body>
</html>
got that code and im thinking what is if i'll choose choice one and press the check button the output would be 123 while if ill choose choice two the output would be abc....
how could i do that???
got another prob!!HTML...
Started by joie2, Oct 11 2009 09:06 PM
7 replies to this topic
#1
Posted 11 October 2009 - 09:06 PM
|
|
|
#2
Posted 12 October 2009 - 09:24 AM
You really need to set the value properties for your radio buttons: HTML Forms and Input
#3
Posted 12 October 2009 - 09:31 AM
I always learned by example.
<?PHP //form1.php print_r($_GET); //echo $_GET['one']; // this is abc or 123 depending on the button ?> <html> <body> <form action="form1.php" method="get"> <input type="radio" name="one" value="123">Choice One <input type="radio" name="one" value="abc">Choice two <input type="submit" value="Check"> </form> </body> </html>
#4
Posted 13 October 2009 - 06:04 PM
i already knew those things...the thing im asking was that when you have that two radio button,a submit button, when you click on the first radio button and click the submit button it will bring you to a page that has a content of 123 while when you choose the second radio button and click submit it will bring you to a page containing abc...could it be posible with just purely html???
#5
Posted 13 October 2009 - 06:09 PM
No, not purely HTML.
Javascript can help you, I know it can access get, I am pretty sure it can get post as well, not totally sure about post though.
PHP can help you, and if you use .htaccess you can make it look like a .html page.
Javascript can help you, I know it can access get, I am pretty sure it can get post as well, not totally sure about post though.
PHP can help you, and if you use .htaccess you can make it look like a .html page.
#6
Posted 13 October 2009 - 06:20 PM
ops maybe can't do that coz i suppose to do only a html file..but thank you...
#7
Posted 13 October 2009 - 07:29 PM
You can't do this purely HTML. HTML is a markup language not a programming language so you can't do logic with it.
#8
Posted 14 October 2009 - 12:44 AM
You can do that with Javascript.. and you will only use an HTML file :)


Sign In
Create Account


Back to top










