Well, this is my original Code:

------------------


// Theme
echo '
<form name="theme" action="options.php" target="right" class="menu"
METHOD="POST">
&nbsp;&nbsp;<select name="theme">';
for($i=0;$i<sizeof($theme_name);$i++)
{
echo "<option value='".$i."'>".$theme_name[$i]."</option>\n";
}

echo '</select>&nbsp;&nbsp;<input type=submit name=get value=select>';

$var_from_dropdown = $_POST['theme'];
exec("echo $var_from_dropdown > /tmp/varfromdropdown");

----------------
The file /tmp/varfromdropdown is still emty. (the dropdown field is NOT emty
by
the time i press the select button)

Any other ideas?



> From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
>
>
> [snip]
> // Theme
> echo '
> <form name="theme" action="options.php" target=right class=menu>
> &nbsp;&nbsp;<select name="theme">';
> for($i=0;$i<sizeof($theme_name);$i++)
> {
> echo "<option value='".$i."'>".$theme_name[$i]."</option>\n";
> }
>
> echo '</select>&nbsp;&nbsp;<input type=submit name=get value=select
> METHOD=POST>';
> // or:
> echo '</select>&nbsp;&nbsp;<input type=submit name=get value=select
> METHOD="POST">';
>
> $var_from_dropdown = $_POST['theme'];
> exec("echo $var_from_dropdown > /tmp/varfromdropdown");
>
> the exec line seems to works since it created the file. But
> it stays emty.
> [/snip]
>
> You need to place METHOD=POST in the original form tag and
> remove it from
> the submit tag. Try that
>
> HTH!
>
> Jay


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to