PDA

View Full Version : Eliminate Dropdown - Set default Parameter


bzzrd2
10-02-2006, 11:04 PM
I want to eliminate a dropdown that allows the user to set the number of days they want their information posted. The maximum allowed is set in the admin panel and the user can select up to that number. I want to be able to retain all rescords unless they are deleted by the Admin. or account user. This is the current dropdown code:
<select name="auction_period">
<?
for($i=1; $i<=$rate["max_period"];$i++)
{
?>
<option value="<? echo $i; ?>"><? echo $i; ?></option>
<?
}
?>
</select>

Fumigator
10-03-2006, 12:25 AM
OK so... remove that form element and replace it with a hidden input field with the value you want hardcoded in it.

bzzrd2
10-03-2006, 01:32 AM
Thank Fumigator
I'm still pretty green with PHP/MySql but I took a shot here. Am I close?? :confused:

<input name="auction_period" type="hidden" option value="1000">

Fumigator
10-03-2006, 02:02 AM
Assuming "1000" is the value you want, then you are absolutely spot on! :) Except for that word "option" you have in there, it's not needed.

bzzrd2
10-03-2006, 02:53 AM
Works perfectly Fumigator! Thank you!!!:thumbsup: