it will also output "" (blank string) if there is no value, so just like it wasn't there.
Yes, but it will also throw a NOTICE. You should really check:
Code:
<?php echo(isset($_GET['name']) ? $variable : ''); ?>
Code:
<select>
.....
<option value="CA" <?php
if ($_GET['item'] == "CA") {
echo "selected";
}
?>>California</option>
.....
</select>
Preferred would be:
Code:
<select>
<option value="CA" <?php
if (isset($_GET['item']) && $_GET['item'] === 'CA')
echo 'selected="selected"';
?>>California</option>
</select>
Bookmarks