Syntax
| From: | PETCOL | Date: | Sat, 14 Feb 2004 07:32:29 +0000 |
| Subject: | Syntax | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177686@lists.php.net to get a copy of this message | ||
Hi People,
PHP Newbie here again. trying to get HTML and PHP to work together really
stumps me at times, I'm trying to output a selection from a form as so:
<option value="Aruba">Aruba</option>
<?php
if (isset($_POST["Country"])) {
echo "<option
value="$_POST["Country"];"selected>\n"$_POST["Country"];"</option>\n";
} else {
echo "<option value="Australia"
selected>Australia</option>\n";
}
?>
<option value="Austria">Austria</option>
This line is whats causing me all the greif:
echo "<option
value="$_POST["Country"];"selected>\n"$_POST["Country"];"</option>\n";
Parse error: parse error, expecting
','' or ';''
Suggestions or tutorials please ;-)
Col