Forums / WEB Development
Lavalair Cpanel Menu
Started on the old forum in April 2008 · view the original in the archive · old links redirect here
23 replies · 2,058 views · started 18 years ago · 1 min read
TL;DR · summary of 23 replies
rukiya provided a corrected code example for the dropdown menu that should work across different devices. The issue seems to be resolved with the use of the correct $action variable from $_GET["action"] instead of using hardcoded variables like $vopt or $action. The thread concluded by suggesting replacing $action in the original code with the appropriate GET variable.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
Sort replies:
Oldest
Top voted
Newest
WI
follow this example
echo '<select name="action">';
echo '<option value="cpanel">Cpanel</option>';
echo '<option value="main">Home</option>';
echo '</select>';
echo '<anchor>GO<go href="index.php" method="get">';
echo '<postfield name="action" value="$(action)"/>';
echo '<postfield name="sid" value="'.$sid.'"/>';
echo '</go>';
echo '</anchor>';
result will be index.php?action=cpanel&sid=whatever sid is or index.php?action=main&sid=whatever sid is
to put it simpler, here is ur code corrected
echo "Cpanel Tools:
<select name=\"action\">";
echo "<option value=\"rwidc\">HT Portal ID card</option>";
echo "<option value=\"myclub\">My Clubs</option>";
echo "<option value=\"search\">Search</option>";
echo "</select>
";
echo "<anchor> [GO]<go href=\"index.php\" method=\"get\">";
echo "<postfield name=\"action\" value=\"$(action)\"/>";
echo "<postfield name=\"sid\" value=\"$sid\"/>";
echo "</go></anchor>
";
MC
mcKeny
Developer · 130 posts
18 years ago
#22
thats tha way it should be use as wizard state... why would you want to end option with the /> tag when the option tag already got a closing tag? the only time you use the /> tag is when tha element is empty eg
it doesn contain anything inside it ....
element
....<postfield name="keny" value="mc"/>no element ...
RU
follow this example
echo '<select name="action">';
echo '<option value="cpanel">Cpanel</option>';
echo '<option value="main">Home</option>';
echo '</select>';
echo '<anchor>GO<go href="index.php" method="get">';
echo '<postfield name="action" value="$(action)"/>';
echo '<postfield name="sid" value="'.$sid.'"/>';
echo '</go>';
echo '</anchor>';
result will be index.php?action=cpanel&sid=whatever sid is or index.php?action=main&sid=whatever sid is
to put it simpler, here is ur code corrected
echo "Cpanel Tools:
<select name=\"action\">";
echo "<option value=\"rwidc\">HT Portal ID card</option>";
echo "<option value=\"myclub\">My Clubs</option>";
echo "<option value=\"search\">Search</option>";
echo "</select>
";
echo "<anchor> [GO]<go href=\"index.php\" method=\"get\">";
echo "<postfield name=\"action\" value=\"$(action)\"/>";
echo "<postfield name=\"sid\" value=\"$sid\"/>";
echo "</go></anchor>
";
I have not noticed before that you posted my code was wrong.prove its wrong.
echo "Cpanel Tools:
<select name=\"vopt\" value=\"rwidc\">";
echo "<option value=\"rwidc\">HT Portal ID card</option>";
echo "<option value=\"myclub\">My Clubs</option>";
echo "<option value=\"search\">Search</option>";
echo "</select>";
echo "<anchor> [GO]<go href=\"index.php\" method=\"get\">";
echo "<postfield name=\"action\" value=\"$(vopt)\"/>";
echo "<postfield name=\"sid\" value=\"$sid\"/>";
echo "</go></anchor>
";
you just replaced $action for $vopt in hypetype's code and here this $action/$vopt isnot the $action = $_GET["action"];
HY
the code works perfect wit opera but not on mobiles, u get errors