![]() |
Using a $_GET Function in templates
Is it possible for me to get retrieve data I attach to the url by using a something similar to the php function "$_GET" in templates?
For example this is what i am trying to do I want a url such as Code:
www.blah.com/forums/index.php?name=blah Code:
<input type='text' class='bginput' name='to' value="$_GET["name"]"> |
You should use the vBulletin Input Cleaner to clean superglobals before using them. When you do that, you can assign a variable to that value, which you can use in your template.
|
Ok I can get the variable with an echo command from the php file. But i define the form in the templates. So in order to give it the default value of the cleaned varrible i need to put it in a variable that can be executed from the templates.
if i just use this in the templates Code:
$vbulletin->GPC['cleanedvariable'] Code:
Array[ |
You need to use curly braces:
Code:
{$vbulletin->GPC['cleanedvariable']} |
All times are GMT. The time now is 07:01 AM. |
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:
|