Page 1 of 1

plz help me how to grab a apecific number froam a page

Posted: Fri Mar 19, 2010 6:47 pm
by sehrawat350
hello iam new to php

but i have a little bit knowledge of php

i want to make a script which grab last number of a url

for example

posting.php?mode=post&f=1

here i want to grab the last number [in this case it is 1]

plz help me

thanks in advance

note : URL TO GRAB THESE NUMBERS IS ENTERED BY THE USER

Re: plz help me how to grab a apecific number froam a page

Posted: Fri Mar 19, 2010 7:08 pm
by Christopher
For URLs those values are in the superglobal array $_GET. For Forms the values are in the superglobal array $_POST. So your two parameters will be in $_GET['mode'] and $_GET['f'].

Remember that these values cannot be trusted and should be filtered and validated before being used.

PS - no need for all bold ...

Re: plz help me how to grab a apecific number froam a page

Posted: Fri Mar 19, 2010 9:07 pm
by uu31z
try this $_REQUEST["f"]