Asked by duncanb7
at 2024-12-08 09:04:42
Point:500 Replies:9 POST_ID:828438USER_ID:11059
Topic:
PHP Scripting Language;Hypertext Markup Language (HTML);JavaScript
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_26659754.html
In this thread above, I have solved to avoid the IE's warning message box cames out when
after visitor login my webpage and then click reload button for update data. In the solution for the thread
I am using to redirect method to redirect the page to mainpage.html as attached index.php code as follows
in order to IE not to re-check the visitor's login and passward again if they reload the webpage. But it create
other issue. Other visitors without given correct login and password could go into the mainpage.html,
just typing www.mywebsite.com/mainpage.html directly at URL address bar in IE if the qualified visitors
(already have correct login and password I gave them) tell them the exact webpage name or location to
non-qualified visitor. That is security issue.
I try to think to avoid this new issue, I should create other mainpage.php file to check login and password
and somebody told me using php session to transfer login and password variable in index.php into
other php file. But I am not family with php and try a lot test code of php but it is failed to do so.
Please help and advise if possible provide php code for this part as the following link
http://www.tizag.com/phpT/phpcookies.php in order to solve my new issue complete.
My target, Once visitor login my website successfully, I need to make sure every webpage
they go is already passed the login process. I try to replace mainpage.html by mainpage.php
and all data or infomation in mainpage.html like table data is put into mainpage.php instead
Duncan
new index.php file
====================
<?
if (($_POST['username']=="checkusername") && ($_POST['password']=="checkpassword")) {
echo '<html>
<meta http-equiv="Refresh" content="0; url=http://www.mywebiste.com/mainppage.php" />
</html> ';
mainpage.php
===========
if (($_POST['username']=="checkusername") && ($_POST['password']=="checkpassword")) {
echo '<html>
<table><td></td></table>
</html> ';
Duncan
In this thread above, I have solved to avoid the IE's warning message box cames out when
after visitor login my webpage and then click reload button for update data. In the solution for the thread
I am using to redirect method to redirect the page to mainpage.html as attached index.php code as follows
in order to IE not to re-check the visitor's login and passward again if they reload the webpage. But it create
other issue. Other visitors without given correct login and password could go into the mainpage.html,
just typing www.mywebsite.com/mainpage.html directly at URL address bar in IE if the qualified visitors
(already have correct login and password I gave them) tell them the exact webpage name or location to
non-qualified visitor. That is security issue.
I try to think to avoid this new issue, I should create other mainpage.php file to check login and password
and somebody told me using php session to transfer login and password variable in index.php into
other php file. But I am not family with php and try a lot test code of php but it is failed to do so.
Please help and advise if possible provide php code for this part as the following link
http://www.tizag.com/phpT/phpcookies.php in order to solve my new issue complete.
My target, Once visitor login my website successfully, I need to make sure every webpage
they go is already passed the login process. I try to replace mainpage.html by mainpage.php
and all data or infomation in mainpage.html like table data is put into mainpage.php instead
Duncan
new index.php file
====================
<?
if (($_POST['username']=="checkusername") && ($_POST['password']=="checkpassword")) {
echo '<html>
<meta http-equiv="Refresh" content="0; url=http://www.mywebiste.com/mainppage.php" />
</html> ';
mainpage.php
===========
if (($_POST['username']=="checkusername") && ($_POST['password']=="checkpassword")) {
echo '<html>
<table><td></td></table>
</html> ';
Duncan