Jump to content

Posting back to the same page


CincoPistolero

Recommended Posts

Hello. I have a website that uses user authentication. The login does a post back to itself to check set usernames and passwords.

 

<?php echo $_SERVER['PHP_SELF']?>

 

sample url:  .../admin/login/index.php

 

This is working on a linux box where the end of the php code sends the page off to a ccc.php page for access checking. So after logging in on the index.php page, you eventually get returned to admin/ccc.php.

 

I reused the same code on a windows box and the .../admin/login/index.php takes me to .../admin/login/index.php/admin/login/index.php

 

does anyone have a clue as to what might cause this? ???

Link to comment
https://forums.phpfreaks.com/topic/76163-posting-back-to-the-same-page/
Share on other sites

You might have a php.ini discrepancy between the servers.

 

Save the following file as phpinfo.php

 

<?php
phpinfo()
?>

 

Upload to the root of each server and call it. Check the PHP Variables section and at the top of that section, quote us what it says for PHP_SELF.

 

PhREEEk

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.