delickate Posted March 26, 2010 Share Posted March 26, 2010 hi, I just submit the form having user name and password but not getting feilds values. my code is as follow <?php $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'process': echo $_REQUEST['username']."=sani"; die(); $username = tep_db_prepare_input($HTTP_POST_VARS['username']); $password = tep_db_prepare_input($HTTP_POST_VARS['password']); } } ?> <form name="login" action="login.php?action=process" method="post"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="infoBoxContent">Username:<br><input type="text" name="username"></td> </tr> <tr> <td class="infoBoxContent"><br>Password:<br><input type="password" name="password" maxlength="40"></td> </tr> <tr> <td align="center" class="infoBoxContent"><br><input type="submit" value="Login" /></td> </tr> </table> </form> any body can help in for this oscommerce code Quote Link to comment https://forums.phpfreaks.com/topic/196603-php-not-getting-values/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 26, 2010 Share Posted March 26, 2010 $HTTP_GET_VARS and $HTTP_POST_VARS were depreciated long ago (8 years), turned off by default in php5, finally throw a depreciated error in php5.3, and have been completely removed in php6. Use $_GET and $_POST Quote Link to comment https://forums.phpfreaks.com/topic/196603-php-not-getting-values/#findComment-1032238 Share on other sites More sharing options...
beamerrox Posted March 26, 2010 Share Posted March 26, 2010 addition: _request is rather un-secure also Quote Link to comment https://forums.phpfreaks.com/topic/196603-php-not-getting-values/#findComment-1032248 Share on other sites More sharing options...
Kieran Menor Posted March 26, 2010 Share Posted March 26, 2010 It's not inherently insecure. You just have to keep in mind that the data could come from 3 sources (GET/POST/COOKIE) rather than one. All of them are considered insecure sources and should be treated with equal care. Quote Link to comment https://forums.phpfreaks.com/topic/196603-php-not-getting-values/#findComment-1032275 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.