vystral Posted May 22, 2007 Share Posted May 22, 2007 Hi, I'm a newbie here. Is it possible to use PHP to clear or reset the address bar (not the history, just what's currently visible)? If so, how would I go about doing that? Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/ Share on other sites More sharing options...
papaface Posted May 22, 2007 Share Posted May 22, 2007 Not possible with PHP. Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259393 Share on other sites More sharing options...
per1os Posted May 22, 2007 Share Posted May 22, 2007 Not possible as far as I know. It would either have to be JavaScript or ActiveX, but I still would not count on finding a way. Security breach of sorts is the reasoning. Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259394 Share on other sites More sharing options...
corbin Posted May 22, 2007 Share Posted May 22, 2007 Ummm if you don't mind, can I ask why you wish to hide the address bar? If it's because you have something like ?var=sensitve data, then you could just use POST (assuming it's user data).... If it's not user data, you could use sessions. If it's just for cleanness that you want to hide URLs then look into mod_rewrite (assuming you're running Apache w/ .htaccess enabled). Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259398 Share on other sites More sharing options...
john010117 Posted May 22, 2007 Share Posted May 22, 2007 PHP is a server-side script. Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259415 Share on other sites More sharing options...
vystral Posted May 23, 2007 Author Share Posted May 23, 2007 Ummm if you don't mind, can I ask why you wish to hide the address bar? If it's because you have something like ?var=sensitve data, then you could just use POST (assuming it's user data).... If it's not user data, you could use sessions. If it's just for cleanness that you want to hide URLs then look into mod_rewrite (assuming you're running Apache w/ .htaccess enabled). There you go. That should work in theory. But, it doesn't seem to be getting the data. Here's what I have: $username=$_POST['username']; $password=$_POST['password']; ..and the form on the previous page: <form name="login" method="get" action="memberhome.php"><input name="username" type="text" value="" size="15" /><input name="password" type="password" size="15" /> etc... Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259463 Share on other sites More sharing options...
trq Posted May 23, 2007 Share Posted May 23, 2007 Change... method="get" to method="post" Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259468 Share on other sites More sharing options...
vystral Posted May 23, 2007 Author Share Posted May 23, 2007 Magnificient. Thanks everyone. One more question, if I may...what is the basic PHP coding to make a form add a row to a MySQL database? I understand the array_push method, but I don't know how to apply that to an actual database. Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259484 Share on other sites More sharing options...
trq Posted May 23, 2007 Share Posted May 23, 2007 Take a look at mysql_query. Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259487 Share on other sites More sharing options...
vystral Posted May 23, 2007 Author Share Posted May 23, 2007 I never thought of just running a query. It's so easy, it might just work! Quote Link to comment https://forums.phpfreaks.com/topic/52572-use-php-to-clear-the-address-bar/#findComment-259490 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.