Jump to content

Need help trimming a function -- YES I'm new at this!!!


networkthis

Recommended Posts

I am a newbie and would like some advice on how to do the following...

Need to trim all dots, slashes, and tildes (. / \ ~) from the beginnings and ends of the $_GET['path'] variable

 

Here is the code

if (isset($_POST['submitBtn'])){
$actpath = isset($_POST['path']) ? $_POST['path'] : '.';	
} else {
$actpath = isset($_GET['path']) ? $_GET['path'] : '.';	
}

 

Definetely curious what the best method would be..maybe an example... I have tried the trim method but I couldn't figure it out ???...Thank you in advance for all your help!!!!!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.