mikk809h Posted May 24, 2014 Share Posted May 24, 2014 Hello pros. I've been working on a website, and i just figured out that a thing is completely wrong. I am entering the website with: "website.com/something.php?name='Hello/system/root/advance.exe'" but somehow the $_POST['name'] is null... My current php code which just prints that post data: <?php $postedFileName = $_POST["name"]; echo $postedFileName; /*#-- Here it doesnt echo anything --#*/ ?> Isnt it possible to use forwardslashes in php? Thanks in Advance Quote Link to comment https://forums.phpfreaks.com/topic/288740-_postfilepath-not-working/ Share on other sites More sharing options...
Solution kicken Posted May 24, 2014 Solution Share Posted May 24, 2014 $_POST is for data sent in the body of a POST request. When you just tack a value onto the url as in ?name=blah then you need to use $_GET to access the value: echo $_GET['name']; Quote Link to comment https://forums.phpfreaks.com/topic/288740-_postfilepath-not-working/#findComment-1480727 Share on other sites More sharing options...
mikk809h Posted May 24, 2014 Author Share Posted May 24, 2014 Uhhh! Thank you sooo much!.. Thats exactly what caused that! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/288740-_postfilepath-not-working/#findComment-1480733 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.