I've started to learn PHP too now, and to do that I borrowed a PHP beginners book from a friend and installed
EasyPHP on my pc (EasyPHP is like WAMP but WAMP gave me issues).
After struggling through the book and doing some exercises, I wanted to make a poll in PHP. Dead simple off course, but not for me. The idea of the poll is to store the IP address into the database as well, so people can't vote twice.
The HTML part of the poll is simple:
But I can't figure out how I should use the result I get from poll.html in result.php. Poll.html sends an array, and according to what I found online, it's name should be $_POST, and if I put echo ("$_POST"); in result.php, the page returns Array, but if I put echo("$_POST[1]"); in results.php I get the error: "Notice: Undefined index: 1 in D:\Program Files\EasyPHP\www\peiling\result.php on line 11". How do I define the index?
The book I have and the information online weren't very helpfull (or I'm just very stupid).