Hi
Can anyone tell me why my form will not post to itself when using these dropdowns.
It will post successfully to another page though. I have tried both just putting in the file name which is rent.php and using the "<?php echo $_SERVER; ?>"
At the moment I am just trying to echo the results of what is selected in the dropdowns to the same page but even that is not working....any help would be fantastic.
many thanks
<form id="proptype" name="proptype" method="post" action="rent.php">
<table width="800" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="321"><label for="prop_type"></label>
<label for="prop_type"></label>
<select name="prop_type" onchange="display(this,'Private Apartments','Landed Property', 'Hdb Flat', 'Commercial', 'Hudc Apartments');">
<option selected="selected">Please Select</option>
<option value="Private Apartments">Private Apartments</option>
<option value="Landed Property">Landed Property</option>
<option value="Hdb Flat">Hdb Flat</option>
<option value="Commercial">Commercial </option>
<option value="Hudc Apartments">Hudc Apartments </option>
<option value="invisible">Invisible</option>
</select></td>
<td width="272"></td>
<td width="117">hello</td>
</tr>
<tbody id="Private Apartments" style="display: none;">
<tr>
<td><label for="prop_saletype1"></label>
<select name="prop_saletype1" id="prop_saletype1">
<?php
do {
?>
<option value="<?php echo $row_prop_apartments['prop_saletype']?>"><?php echo $row_prop_apartments['prop_saletype']?></option>
<?php
} while ($row_prop_apartments = mysql_fetch_assoc($prop_apartments));
$rows = mysql_num_rows($prop_apartments);
if($rows > 0) {
mysql_data_seek($prop_apartments, 0);
$row_prop_apartments = mysql_fetch_assoc($prop_apartments);
}
?>
</select></td>
</tbody >
<tbody id="Landed Property" style="display: none;">
<td><label for="prop_saletype2"></label>
<select name="prop_saletype2" id="prop_saletype2">
<?php
do {
?>
<option value="<?php echo $row_prop_landed['prop_saletype']?>"><?php echo $row_prop_landed['prop_saletype']?></option>
<?php
} while ($row_prop_landed = mysql_fetch_assoc($prop_landed));
$rows = mysql_num_rows($prop_landed);
if($rows > 0) {
mysql_data_seek($prop_landed, 0);
$row_prop_landed = mysql_fetch_assoc($prop_landed);
}
?>
</select></td>
</tbody >
<tbody id="Hdb Flat" style="display: none;">
<td><label for="prop_saletype3"></label>
<select name="prop_saletype3" id="prop_saletype3">
<?php
do {
?>
<option value="<?php echo $row_prop_hdb['prop_saletype']?>"><?php echo $row_prop_hdb['prop_saletype']?></option>
<?php
} while ($row_prop_hdb = mysql_fetch_assoc($prop_hdb));
$rows = mysql_num_rows($prop_hdb);
if($rows > 0) {
mysql_data_seek($prop_hdb, 0);
$row_prop_hdb = mysql_fetch_assoc($prop_hdb);
}
?>
</select></td>
</tbody>
<tbody id="Commercial" style="display: none;">
<td><label for="prop_saletype4"></label>
<select name="prop_saletype4" id="prop_saletype4">
<?php
do {
?>
<option value="<?php echo $row_prop_commercial['prop_saletype']?>"><?php echo $row_prop_commercial['prop_saletype']?></option>
<?php
} while ($row_prop_commercial = mysql_fetch_assoc($prop_commercial));
$rows = mysql_num_rows($prop_commercial);
if($rows > 0) {
mysql_data_seek($prop_commercial, 0);
$row_prop_commercial = mysql_fetch_assoc($prop_commercial);
}
?>
</select></td>
</tbody>
<tbody id="Hudc Apartments" style="display: none;">
<td><label for="prop_saletype5"></label>
<select name="prop_saletype5" id="prop_saletype5">
<?php
do {
?>
<option value="<?php echo $row_prop_Hudc['prop_saletype']?>"><?php echo $row_prop_Hudc['prop_saletype']?></option>
<?php
} while ($row_prop_Hudc = mysql_fetch_assoc($prop_Hudc));
$rows = mysql_num_rows($prop_Hudc);
if($rows > 0) {
mysql_data_seek($prop_Hudc, 0);
$row_prop_Hudc = mysql_fetch_assoc($prop_Hudc);
}
?>
</select></td>
</tbody>
</tr>
<tr>
<td><input type="submit" name="submit" id="submit" value="Submit" /></td>
</tr>
</table>
</form>