need help in dynamic select menu in php
Posted on
16th Feb 2014 07:03 pm by
admin
hi i have created a dynamic select menu using php. i have a problem in that which is when the user select any value in that menu and press submit then it does not pass to next page.
my code is here
Did you know?Explore Trending and Topic pages for more stories like this.
Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
$db = mysql_connect("localhost");
mysql_select_db("test", $db);
$query = "SELECT * FROM day" or die(mysql_error()); // id='".$id."'
//echo $query;
$result = mysql_query($query) or die(mysql_error());
?>
<form name="form1" method="post" action="date.php">
<label>Date:
<select name="day" id="day">
<?php while( $row = mysql_fetch_array($result) ) { ?>
<option value="<?php $row['id']; ?>"><?php echo $row['day']; ?></option>
<?php } ?>
</select>
</label>
<p>
<label>
<input type="submit" name="button" id="button" value="Submit">
</label>
</p>
</form>
</body>
</html>
the next page is
Code: <?php
$day = $_POST["day"];
echo $day;
?>
No comments posted yet
Your Answer:
Login to answer
305
47
Other forums
Help with lottery style system?
I'm working on a currency system for forums and it is going to have a type of lottery system built i
Does deleting the spmlog directory critical?
Hi Everyone,
Please, hope you could help me. We're having problems with the SAP backup. I
Page not Loading After Test
Hey All
It seemed that an inlcude statement wasn't working for some reason, so I tried a more
Pspell with my own dictionary
Hello!
I've tested two cases using pspell functions.
1)
Code: $dictionary_link = pspell_new
Apple's revamped lineup arrives
I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be nea
How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php
Thanks in advance
RFQ Configuration - can you make PLANT field an optional field in ME42
Is there a way to make the plant field on an RFQ optional in change mode (ME42)?
Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass
Help on code output
My CODE:
Code: [Select] echo "<phone>".$line["phone"].&qu
media recovery
Hi,
i startup the database i got the error
SQL> startup
ORACLE instance started.