mrheff Posted March 14, 2007 Share Posted March 14, 2007 hi i was wondering can i put a str replace in here $dirname = Trim(stripslashes($_POST['directory'])); instead of having to call the variable and do it there also can i get rid of just an empty variable to stop my app creatingit in the root? can i do this with a if ($dir="";)then( argument ) else(perform procedure) does anyone know the syntax for this plaese? Ta for your time .... heff.... Quote Link to comment https://forums.phpfreaks.com/topic/42730-solved-str-rplace-woe-really-simple/ Share on other sites More sharing options...
per1os Posted March 14, 2007 Share Posted March 14, 2007 $dirname = str_replace("replacewhat", "replacewith", trim(stripslashes($_POST['directory']))); if (empty($dir)) { // argument here }else { //procedure here } --FrosT Quote Link to comment https://forums.phpfreaks.com/topic/42730-solved-str-rplace-woe-really-simple/#findComment-207320 Share on other sites More sharing options...
mrheff Posted March 19, 2007 Author Share Posted March 19, 2007 Thank you very much, somehow i managed get myself very confused when i was putting it in, however after a couple of cups of tea it all clicked lovely and i couldnt see how it was that i couldnt do it befor, hah, anyway bigthanks again. Quote Link to comment https://forums.phpfreaks.com/topic/42730-solved-str-rplace-woe-really-simple/#findComment-210454 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.