Skip to main content
gamedev.net
🔒 Locked

[web] PHP "hacking"

Started by 41ph4_r4p70r 1 reply 850+ views
Original Post
41ph4_r4p70r
41ph4_r4p70r
Ihave the following piece of code in php, I know in the end, all of the variables referenced here (choosen by the user) will be passed to the script "vote.php" , and I know where it is located (namely www.site.com/whatever/vote.php) what I dont know is what variables are being passed to the script and In what order, and thats what I need to know, any help would be appreciated Its just I have a friend that made the script and Im trying to "hack it" just for the fun of it ******START CODE****** <form method=post action=vote.php target=_top> ... <select name="grade"> <option>choose</option> <option value=excellent>excellent</option> <option value=good>good</option> <option value=bad>bad</option> </select> </td> <td width="80" align="center"> <select name="points"> <option>Points</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> <option value=6>6</option> <option value=7>7</option> <option value=8>8</option> <option value=9>9</option> <option value=10>10</option> </select> <input type=hidden name=id value=40> </td> <td width="68" align="center"><input type=submit value=GoVote></td> ... ******END SCRIPT*******
Rob Loach
Rob Loach
Check out the W3Schools tutorial on PHPForms. You should use $_POST['foo']. You don't have to worry about which variable comes first or last as they are all sent when the user clicks "Send".
Rob Loach [Website] [Projects] [
igni ferroque
igni ferroque
The DIY version:
<code>
<?php
print_r($_POST)
?>
</code>

print_r shows the contents of a variable in a human-readable way.
Free Mac Mini (I know, I'm a tool)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.