PDA

View Full Version : How 2 Validate Form Input in Vbulletin


Come2Daddy
05-22-2009, 10:46 AM
Hello there,

I'm trying to make a modification which will be a form in a powered by vbulletin page, so the user input his data in that form, but I'm afraid of possible security risk that sure going to occur, so I don't know whether I should go through validating the input of my form or I should just call vbulletin functions and it does the nasty part of validating my form input?, so I concentrate on building the database tables and page templates :)

has any one any idea??

EnIgMa1234
05-22-2009, 10:51 AM
You can use
$vbulletin->input->clean_gpc('p', 'postnamehere', TYPE_STR(INT,ARRAY etc);
or
$vbulletin->input->clean_array_gpc('p', array(
'postname1' => TYPE_****,
'postname2' => TYPE_*** ));


You can then use
$vbulletin->GPC['postnamehere']
to show the value.

Hope thats clear

Come2Daddy
05-22-2009, 11:02 AM
wow, actually I didn't understand it well, but I'm glad that I don't have to go through validating form input, anyways,
just if you could refer me to a tutorial for these clean_gpc, and clean_array_gpc functions, pleas
I would appreciate it

thanks Enigma :)

EnIgMa1234
05-22-2009, 11:24 AM
<a href="http://members.vbulletin.com/api" target="_blank">http://members.vbulletin.com/api</a>

That's the vbulletin api.

Come2Daddy
05-22-2009, 12:00 PM
Thanks, buddy :)

veenuisthebest
05-22-2009, 12:04 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=119372" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=119372</a>

Come2Daddy
05-22-2009, 07:08 PM
https://vborg.vbsupport.ru/showthread.php?t=119372
this is just what I'm looking for
thank you very much

thanks for both of you, guys (veenuisthebest, EnIgMa1234)