Click here to Skip to main content
15,910,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<?php

            for($day = 1 ; $day <= 30; $day++){
            echo "<option value=".$day.">".$day."</option>";
        }


i want that value transfer to other php page... Pls help me~~~
Posted

1 solution

In the first php page you have a select box

for example
HTML
<form name="form1" action="PhpPage2.php">
<select name="dropdown1">
<?php
for($day = 1 ; $day <= 30; $day++){
echo "<option value=".$day.">".$day."</option>";
}
?>
</select>
</form>


Now to get the value of the select box you need to use the following in the second php page (PhpPagae2.php)
PHP
<?php
  $dropdown1 = $_POST["dropdown1"];
  echo $dropdown1;
?>


Hope this helps
 
Share this answer
 
v4
Comments
JaironLanda 30-Aug-14 14:22pm    
Thanks, i give you 5 stars!
ChauhanAjay 30-Aug-14 14:25pm    
you are welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900