I am just trying to figure out why even though i have a value selected, my isset is pulling through that there is no data selected.
The HTML:
<form action="submitBackgroundImage.php" id="submitBackground">
<input type="radio" name="background" value="lake" checked="checked"> Lake.jpg<br>
<input type="radio" name="background" value="dock"> Dock.jpg<br>
<input type="radio" name="background" value="forest"> Forest.jpg<br>
<button type="submit" form="submitBackground" value="Submit">Submit</button>
</form>
The PHP in "submitBackgroundImage.php":
<?php
if (isset($_POST['background'])) {
echo "Data Selected";
}
else
{
echo "No Data Selected";
};
?>
This returns:
I'm a PHP novice so any advice is appreciated.