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' "); ?> Link to comment https://forums.phpfreaks.com/topic/128509-solved-using-post/ 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']; Link to comment https://forums.phpfreaks.com/topic/128509-solved-using-post/#findComment-666104 Share on other sites More sharing options...
pietbez Posted October 15, 2008 Author Share Posted October 15, 2008 thanks Link to comment https://forums.phpfreaks.com/topic/128509-solved-using-post/#findComment-666125 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. Link to comment https://forums.phpfreaks.com/topic/128509-solved-using-post/#findComment-666142 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.