sivanath.nagendran Posted December 1, 2006 Share Posted December 1, 2006 Hey I am newbie to PHP language. Can anyone give me the correct solution for my doubt. In HTML select menu I gave values and Id for each values. Now I need help for, If I select one option in select menu, then I need that corresponding Id for that option or the selected option to another Page. In first page I had design the select menu, in second page I need the output just print on the another page..... advance thanks to you.BySivanath.N Quote Link to comment Share on other sites More sharing options...
AndyB Posted December 1, 2006 Share Posted December 1, 2006 First page:[code]<form method="post" action="nextpage.php"><select name="widget"><option value="1">1</option>....</select><input type="submit" name="submit" value="Choose"></form>[/code]And[code]<?php// nextpage.php$picked = $_POST['widget'];echo "You chose option ". $widget;?>[/code] Quote Link to comment Share on other sites More sharing options...
sivanath.nagendran Posted December 4, 2006 Author Share Posted December 4, 2006 Hi Thank you so much. Thousands of thanks to you. It's working now.BySivanath.N Quote Link to comment Share on other sites More sharing options...
DeathStar Posted December 16, 2006 Share Posted December 16, 2006 This isnt HTML its php Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted December 17, 2006 Share Posted December 17, 2006 [quote author=AndyB link=topic=117021.msg477313#msg477313 date=1165017400][code]<?php// nextpage.php$picked = $_POST['widget'];echo "You chose option ". $widget;?>[/code][/quote]Change [tt]$widget[/tt] to [tt]$picked[/tt]. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.