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
plz help me how to grab a apecific number froam a page
Moderator: General Moderators
-
sehrawat350
- Forum Newbie
- Posts: 3
- Joined: Fri Mar 19, 2010 6:41 pm
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: plz help me how to grab a apecific number froam a page
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 ...
Remember that these values cannot be trusted and should be filtered and validated before being used.
PS - no need for all bold ...
(#10850)
Re: plz help me how to grab a apecific number froam a page
try this $_REQUEST["f"]