Hi guys, Happy New Year!
I'm trying to setup a voting site where the button under the contest entry just says "Vote For Me" and my form will collect the data from that button and store it into MySQL. I'm having trouble naming that image/vote button so the form will pick it up and put it into the DB as a collected vote.
I'm using this to no result:
<form action="db_update.php" method="post"> //image to vote on <input type="image" name="<?php $_POST["person1"]; ?>" value="submit" id="person1" src="<?php echo $img; ?>" alt="<?php echo $alt; ?>" /> </form>
(I have variable images whether the person is registered or not)
Then my bd_update.php file reads partially like this:
<?php $conn = //DB Connection $name = ($_POST['name']); $Username = ($_POST['Username']); $conn = "UPDATE images SET vote = '$name' where 'Username' = '$Username')"; ?>
As always, your help is invaluable!