Jump to content

$_SERVER['PHP_SELF'] not working right :S


zhshero

Recommended Posts

and that solved the problem

new problem

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\login.php:51) in C:\xampp\htdocs\functions.php on line 160

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\login.php:51) in C:\xampp\htdocs\login.php on line 64

 

i shouldn't even be getting errors with my site all i did was moved webhosts :S

Don't use $_SERVER['PHP_SELF'] to submit a form to itself, it presents a known XSS vulnerability. Just use action=""

 

As for the second error, you're calling session_start() after there has been some other output to the browser. If you weren't getting that error before, the previous host probably had error_reporting = Off.

Warning: Cannot modify header information - headers already sent by (output started at /home/zhshero/public_html/home.php:2) in /home/zhshero/public_html/functions.php on line 57

 

line 57 at functions.php

header ( "Location: " . REDIRECT_TO_LOGIN );

 

i have a lot of thoses header redirects in there

would it still work if i'm getting this error or no

b/c of right now i'm really not sure of a way around this unless i contact my host :/ :(

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.