fizzik
05-18-2010, 01:16 AM
Hiya,
having a little bit of a problem trying to get this code to work.
What i have is:
- admin clicks "award points" for a post. when link to award points is clicked the postid and userid are taken along too eg:
the following is for the link in the postbit_legacy template
<a href="award.php?postid={vb:raw post.postid}&userid={vb:raw post.userid}">award</a>
the following is a bit from my award.php
if ($_REQUEST['do'] == '')
{
$_REQUEST['do'] = 'main';
}
if ($_REQUEST['do'] == 'main')
{
$giveuserid = $_REQUEST['userid'];
$givepostid = $_REQUEST['postid'];
- taken to a template where the admin selects number of points to be awarded for the post. Here lies the problem, the template is rendered fine but here is my form action code:
the following is fom my points_add template
<form action="award.php?do=add&postid=$givepostid&userid=$giveuserid" method="post">
i was hoping that passing the userid and postid to the $giveuserid and $givepostid would work, but it doesnt seem to. I need these to informations to use in my sql query to add points to the user in the db. but when i submit the form it leaves postid=&userid= (both blank, which makes the query fail obviously)
any help would be much appreciated.
having a little bit of a problem trying to get this code to work.
What i have is:
- admin clicks "award points" for a post. when link to award points is clicked the postid and userid are taken along too eg:
the following is for the link in the postbit_legacy template
<a href="award.php?postid={vb:raw post.postid}&userid={vb:raw post.userid}">award</a>
the following is a bit from my award.php
if ($_REQUEST['do'] == '')
{
$_REQUEST['do'] = 'main';
}
if ($_REQUEST['do'] == 'main')
{
$giveuserid = $_REQUEST['userid'];
$givepostid = $_REQUEST['postid'];
- taken to a template where the admin selects number of points to be awarded for the post. Here lies the problem, the template is rendered fine but here is my form action code:
the following is fom my points_add template
<form action="award.php?do=add&postid=$givepostid&userid=$giveuserid" method="post">
i was hoping that passing the userid and postid to the $giveuserid and $givepostid would work, but it doesnt seem to. I need these to informations to use in my sql query to add points to the user in the db. but when i submit the form it leaves postid=&userid= (both blank, which makes the query fail obviously)
any help would be much appreciated.