PDA

View Full Version : How Do I


Preech
04-12-2012, 04:28 PM
I am creating a script which when a link is click it will go to the next page like such.

something.php?id=3

In my php code it is using this.

$id=(isset($_REQUEST['id']))?$_REQUEST['id']:'';

I know that this won't work in vbulletin. How should I use this. Also should I put this before or after my query.

kh99
04-12-2012, 11:32 PM
I know that this won't work in vbulletin. How should I use this.

You *could* do that in vbulletin, but vbulletin provides functions for "cleaning" the input beofre using it, so you'd use something like this:

$vbulletin->input->clean_gpc('r', 'id', TYPE_UINT);
$id = $vbulletin->GPC['id'];



Also should I put this before or after my query.

What query? It probably doesn't matter, but obviously you need to do it before you use the id value.

Preech
04-13-2012, 03:51 PM
Thank you so much.