pietbez Posted October 15, 2008 Share Posted October 15, 2008 please help using this link should increase the vote count of catagory 3 by one. what am i doin wrong? http://www.website.co.uk/vote/vote.php?id=3 <? include('../qazwsxedc/config.php'); mysql_connect($server,$username,$password); @mysql_select_db($database) or die ("Unable to connect to the database"); $id=$_POST['id']; $do=mysql_query ("UPDATE vote SET votes=votes+1 WHERE id ='$id' "); ?> Quote Link to comment Share on other sites More sharing options...
revraz Posted October 15, 2008 Share Posted October 15, 2008 You need to use GET, not POST. $id=$_GET['id']; Quote Link to comment Share on other sites More sharing options...
pietbez Posted October 15, 2008 Author Share Posted October 15, 2008 thanks Quote Link to comment Share on other sites More sharing options...
CroNiX Posted October 15, 2008 Share Posted October 15, 2008 Anything that you grab from the url is a $_GET. The only time post is used is when it is in a form and the forms 'method' is set to use post instead of get. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.