example :
Code: Select all
$name = $_POST['name'];Code: Select all
$name = $_REQUEST['name'];Moderator: General Moderators
Code: Select all
$name = $_POST['name'];Code: Select all
$name = $_REQUEST['name'];Code: Select all
$price = array('product1' => $100.00, 'product2' => $200) etc.Code: Select all
<select name="a" STYLE="width: 110 px">
<option selected="selected" value="">Please Select</option>
<option value="100">100</option>
<option value="500">500</option>
<option value="1,000">1,000</option>
<option value="2000">2,000</option>
<option value="3000">3,000</option>
<option value="4000">4,000</option>
<option value="5000">5,000</option>
<option value="10000">10,000</option>
</select>Code: Select all
<?php
$selects = array();
$selects['a'] = array('100', '500', '1,000', '2000', '3000', '4000', '5000', '10000');
// So on with the other select lists
echo '<select name="a">';
foreach ($selects['a'] as $value) {
echo '<option value="' . $value . '">' . $value . '</option>';
}
echo '</select>';
?>Code: Select all
<?php
// Default values for posted form elements
$a = '100';
if (!empty($_POST['a'])) {
$a = $_POST['a']; // This really should be validated before using it
}
// Other code from above, and now on to the loop
echo '<select name="a">';
foreach ($selects['a'] as $value) {
$selected = ($a == $value) ? ' selected="selected"' : ''; // Ternary operator used to set selected item
echo '<option value="' . $value . '"' . $selected . '>' . $value . '</option>';
}
echo '</select>';
?>Forum Commoner is a title for users. It is based on post count and nothing more.revocause wrote:and whats with that avatar = forum commoner?
are moderators insulting new members?
you never know who's on here right?