Log in

View Full Version : Trimming data from URL


gopherhockey
03-13-2006, 01:05 AM
I have an old hack I am trying to upgrade to work with Vbulletin 3.5. It used to work with 3.0 etc.

At one point a link causes the following url:

http://www.morcmtb.net/forums/trail.php?s=&action=edittrail&trailid=21

The code needs to pull out the "action" of "edittrail" and the trailid.

Currently it is:

$action = trim($action);

But that is not setting the action to anything at all.. its empty.

Am I perhaps missing some variables or some global settings? Or maybe this code is no longer valid.

merk
03-13-2006, 07:28 AM
register_globals is off by default in all PHP installations.

It enforces more secure coding.

$_REQUEST['action'] will contain your variable.