Hi
I've a Drop down list filled from a mysql table and I've gpot also a text field, I want to send the selection made from the drop down list and the text field to another php program, I've receive the information from the text field but not the drop down list selection.
This is the php program with the drop down list and the text field:
<html>
<h5>Select Ext</h5>
<form method="get" action="DropDownListExtPhpShow.php" >
<p>
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("calls", $con);
//query1 select Ext
$query1 = "SELECT Ext FROM structure ";
//Query
$result1 = mysql_query($query1) or die(mysql_error());
//Start Drop Down List
echo "<select name='Ext'>";
// printing the list select command
while($row1=mysql_fetch_array($result1)){
echo"<option value=>$row1[Ext]</option>";
/* values are added by looping Mysql*/
}
echo "</select>";// Closing drop down List
?>
</p>
<p>
<label>Enter Name
<input name="name" type="text" id="name">
</label>
</p>
<p>
<input type="submit" value="Submit" />
</p>
</form>
</html>
When I see the URL from the receiver program I see the value from text field "name" but "Ext" has nothing.
This is the receiver program:
<?php
$Ext=$_GET['Ext'] ;
$Name=$_GET['name'] ;
echo "$Ext"." ---- "."$Name";
?>
I dont know if I missing something in the first program to get the Ext value from the drop down list
Thaks
I've a Drop down list filled from a mysql table and I've gpot also a text field, I want to send the selection made from the drop down list and the text field to another php program, I've receive the information from the text field but not the drop down list selection.
This is the php program with the drop down list and the text field:
<html>
<h5>Select Ext</h5>
<form method="get" action="DropDownListExtPhpShow.php" >
<p>
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("calls", $con);
//query1 select Ext
$query1 = "SELECT Ext FROM structure ";
//Query
$result1 = mysql_query($query1) or die(mysql_error());
//Start Drop Down List
echo "<select name='Ext'>";
// printing the list select command
while($row1=mysql_fetch_array($result1)){
echo"<option value=>$row1[Ext]</option>";
/* values are added by looping Mysql*/
}
echo "</select>";// Closing drop down List
?>
</p>
<p>
<label>Enter Name
<input name="name" type="text" id="name">
</label>
</p>
<p>
<input type="submit" value="Submit" />
</p>
</form>
</html>
When I see the URL from the receiver program I see the value from text field "name" but "Ext" has nothing.
This is the receiver program:
<?php
$Ext=$_GET['Ext'] ;
$Name=$_GET['name'] ;
echo "$Ext"." ---- "."$Name";
?>
I dont know if I missing something in the first program to get the Ext value from the drop down list
Thaks