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.

7 participants
wizard Senior · 493 posts #21

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>
";
mcKeny Developer · 130 posts #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 ...

R.M.C

PHP Adovocate B)

rukiya Lead · 569 posts #23

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"];

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close