I sort of managed to get it working like this, but only if I the value is in a specific numerical order. ...Is there a better solution?
[php]
<?php
if(isset($_POST[mySelect])){
$mySelect = $_POST[mySelect];
switch($mySelec t){
case 1:
$mySelectOption[1] = 'selected';
break;
case 2:
$mySelectOption[2] = 'selected';
...
User Profile
Collapse
-
-
How to maintain the users list box selection on post?
Hi Guys
I am trying to maintain the users list box selection after posting.
How can I get this script to work?
Is there perhaps a better way of doing this?
<?php
$mySelectOption['1'] =
$mySelectOption['2'] =
$mySelectOption['3'] =
$mySelectOption['4'] =
$mySelectOption['5'] =
$mySelectOption['6'] = '';
if(!empty($_REQ UEST['mySelect'])){... -
variable variables
Hi Guys
This is an example of the use of variable variables:
Does this example look correct???
$myvar = "numbers";
$$myvar = array(1,2,3,4);
echo "<p>Varname :" .$myvar. "</p>";
echo "<p>Value:" .$$myvar. "</p>";
echo "<p>Item:". $numbers[1]. "</p>";
No activity results to display
Show More
Leave a comment: