![]() |
vB4 - Trouble using variables from custom form in dynamic PHP page
I have set up a dynamic PHP page that includes a custom form like this from which I want to use the input field's value for a database query search:
Code:
$search_output .= '<form name="medal_search" action="' . $searchURL . '" method="post">'; Code:
vB::$vbulletin->input->clean_gpc('p', 'medal_search_player', TYPE_STR); Code:
$medalStatsSearchVars = array( Code:
$medalStatsSearchVars['medal_search_player'] |
First of all:
Never use strings from user input in output directly -> Cross Site Scripting. What's in the twmplate (vbcms_content_phpeval_page) you are trying to output? It needs to be smth. like Code:
Player Name: {vb:raw medalStatsSearchVars.medal_search_player} |
Quote:
To make this situation more clear: I created a new article and selected dynamic PHP content which uses said template, then I pasted my PHP code into that article and that's where I want to use the variables. The code format that you posted is only usable in a HTML template if I'm not mistaken? |
Quote:
PHP Code:
You can't put any custom variables into template vbcms_content_phpeval_page without customizign it (or creating a new one). The only variable that is their for your ot use is $outut: PHP Code:
|
All times are GMT. The time now is 11:37 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|