Technology
Join us on LinkedIn!
Join us on Facebbook!
Follow Us on Twitter!
Subscribe to our RSS Feed!
Please make sure you have different variable names
<?php $do = $_GET['do']; $items = $_POST['num_items']; $rad = $_POST['rad']; if($do=="send"){ if($rad=="cmb"){ echo "<form action='cmb.php' method='post'>";<br /> echo "<select name='sel' >";<br /> <br /> for($cnt = 1; $cnt<=$items; $cnt++){ echo "<option value".$cnt.">".$cnt."</option>" ;<br /> }<br /> echo "</select><br /> <input type='submit' value='submit' /><br /> </form>";<br /> }<br /> else if($rad=="rad"){<br /> <br /> echo "<form action='rad.php' method='post'>";<br /> for($cnt = 1; $cnt<=$items; $cnt++){ echo "<input type='radio' name='rad2' value=".$cnt." />".$cnt."<br>";<br /> }<br /> echo "<input type='submit' value='submit' /><br /> </form>";<br /> <br /> }<br /> }<br /> else{?><br /> <form action="labquiz-2.php?do=send" method="post"><input type="text" name="num_items" /><br /> <br /><br /><br /> <input type="radio" name="rad" value="cmb" /> Checkbox<br /> <br /><br /> <input type="radio" name="rad" value="rad" /> Radio<br /> <br /><br /> <input type="submit" value="submit" /><br /> <br /> </form><br /> <?php } ?>
save to another php file for radio
<? $value = $_POST['rad2']; echo "Your Value is ".$value; ?>
//?
$value = $_POST['sel'];
echo "Your Value is ".$value;
?>
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2012
(3)
►
February
(3)
►
2011
(3)
►
February
(3)
▼
2010
(12)
►
November
(4)
▼
February
(7)
win as much as $1000
Please make sure you have different variable names...
Compaq Presario CQ61-410US 15.6-Inch Laptop (Black...
Cellphone -Amazon.com
PSITS DIGITAL ART
Facebook vs Programming!
FlexiMenus JS Dreamweaver
►
January
(1)
►
2009
(19)
►
December
(4)
►
November
(2)
►
October
(3)
►
August
(10)
Labels
Bing
(1)
chat
(1)
EXCEL
(1)
Google
(1)
Green website
(1)
internet
(1)
Microsft
(1)
MySQL
(1)
PHP
(1)
technology news
(1)
Tutorials
(1)
web design graphics design
(1)
Web Development
(2)
yahoo mail
(1)
Tags
Bing
(1)
chat
(1)
EXCEL
(1)
Google
(1)
Green website
(1)
internet
(1)
Microsft
(1)
MySQL
(1)
PHP
(1)
technology news
(1)
Tutorials
(1)
web design graphics design
(1)
Web Development
(2)
yahoo mail
(1)
0 comments:
Post a Comment