form dropdown menu

Teddery
avatar
rank Regular

Regular


Posts: 28
Joined: 2006-01-09
Location: Netherlands

I need to simply echo an dropdown menu with php and use $post to post the name of the field. Oops! my bad

echo "<select name="selectBox" id="selectBox" onchange="OnChange(this.form.selectBox);">";
echo "<option value="" selected> </option>";
echo "<option value=1>1</option>";
echo "<option value=2>2</option></select>" . $_POST['email'] .;

there is something wrong with the php echo ing thing how to echo this

Tyssen
Tyssen's picture
rank Moderator

Moderator


Posts: 6535
Joined: 2004-05-01
Location: Brisbane

I don't understand the

I don't understand the question.

How to get help
Post a link. If you can't post a link, post ALL your code, both HTML & CSS. No server-side code; just the code sent to the browser.
Use tags.
My articles | CSS Reference

Teddery
Teddery's picture
rank Regular

Regular


Posts: 28
Joined: 2006-01-09
Location: Netherlands

{ $email_host =

{
$email_host = explode("@", $mail);
$email_host = $email_host['1'];
$email_resolved = gethostbyname($email_host);

if ($email_resolved != $email_host && eregi("^[0-9a-z]([-_.~]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$",$mail))
$valid = 1;

return $valid;
}

// als er niet op submit is gedrukt, of als er wel op is gedrukt maar niet alles ingevoerd is
if (!$_POST['submit'] || $_POST['submit'] && (!$_POST['naam'] || !$_POST['email'] || !checkmail($_POST['email']) || !$_POST['msggs'] || !$_POST['onderwerp']))
{
if ($_POST['submit'] && (!$_POST['naam'] || !$_POST['email'] || !checkmail($_POST['email']) || !$_POST['msggs'] || !$_POST['onderwerp']))
{
echo "Je hebt niet alle velden ingevuld. Ook kan het zijn <BR> ";
echo "dat je een verkeerd e-mail adres hebt ingevuld.<p>";
}

// form + tabel
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<form method=\"POST\" ACTION=\"" . $_SERVER['PHP_SELF'] . "\">";


// naam
echo "<tr><td>Voor / achternaam</td></tr>";
echo "<tr><td><input type=\"text\" name=\"eigennaam\" value=\"" . $_POST['eigennaam'] . "\"></td></tr>";


// mail
echo "<tr><td>E-mail adres</td></tr>";
echo "<tr><td><input type=\"text\" name=\"email\" value=\"" . $_POST['email'] . "\"></td></tr>";


// mail
/*
echo "<tr><td>soortnaam</td></tr>";
echo "<tr><td><input type=\"text\" name=\"soortnaam\" value=\"" . $_POST['soortnaam'] . "\"></td></tr>";
*/
**********************************************************************************************
echo "<select name="selectBox" id="selectBox" onchange="OnChange(this.form.selectBox);">";
echo "<option value="" selected> </option>";
echo "<option value=1>1</option>";
echo "<option value=2>2</option></select>" . $_POST['email'] .;
**********************************************************************************************

// mail
echo "<tr><td>m v unisex</td></tr>";
echo "<tr><td><input type=\"text\" name=\"mvunisex\" value=\"" . $_POST['mvunisex'] . "\"></td></tr>";


// mail
echo "<tr><td>onderwerp</td></tr>";
echo "<tr><td><input type=\"text\" name=\"onderwerp\" value=\"" . $_POST['onderwerp'] . "\"></td></tr>";


// mail
echo "<tr><td>naam</td></tr>";
echo "<tr><td><input type=\"text\" name=\"naam\" value=\"" . $_POST['naam'] . "\"></td></tr>";


// mail
echo "<tr><td>betekenis</td></tr>";
echo "<tr><td><input type=\"text\" name=\"betekenis\" value=\"" . $_POST['betekenis'] . "\"></td></tr>";

// mail
echo "<tr><td>bericht</td></tr>";
echo "<tr><td><TEXTAREA name=\"msggs\" ROWS=\"6\" COLS=\"45\">" . htmlentities($_POST['msggs']) . " </TEXTAREA></td></tr>";

// button
echo "<tr><td>&nbsp;</td></tr>";
echo "<tr><td><input type=\"submit\" name=\"submit\" value=\"Versturen\"></td></tr>";

// sluit form + tabel
echo "</form>";
echo "</table>";

its not css related question want to echo the dropdown menu see code
}
**********************************************************************************************