vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   passing variable data along (https://vborg.vbsupport.ru/showthread.php?t=242751)

fizzik 05-18-2010 01:16 AM

passing variable data along
 
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
Code:

<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
Code:

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
Code:

<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.


All times are GMT. The time now is 10:06 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01790 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete