I'm trying to have a form that when you select the radio button it will select the image and query into the server; now I'm not quite sure as to how this would be accomplished because when I select any other then the original it doesn't seem to work. My form Code (Well. The important part)
<form action="update_image.php" method="post">
<input type="hidden" name="page" value="Index" />
<td><center><input name="image" type="radio" value="images/cartoon/2ofus.png" /></center></td>
<td><center><input name="image" type="radio" value="img src='images/cartoon/3lb_Bruce.png" /></center></td>
<td><center><input name="image" type="radio" value="img src='images/cartoon/bearry.png" /></center></td>
<td><center><input name="image" type="radio" value="img src='images/cartoon/Bemmer.png" /></center></td>
<input type="submit" value="Update" />
</form>
My Query is as follows:
$link = mysqli_connect("$server", "$user", "$pass", "$webdb");
$page = mysqli_real_escape_string($link, (string) $_POST['page']);
$content = mysqli_real_escape_string($link, (string) $_POST['image']);
$query = "UPDATE `pages`
SET `image`='<$image>'
WHERE `name`='$page'";
mysqli_query($link, $query);
mysqli_close($link);
?>
It's not the best in the world, but overall I think it should work solidly, but it doesn't, so if anyone might know why it'd be great. Thanks.
The first Is the original. Sorry for not specifying.