php - Issue with $_SERVER['HTTP_REFERER'] , trying to redirect to last page? -



php - Issue with $_SERVER['HTTP_REFERER'] , trying to redirect to last page? -

** update script **

here sample of script i'm trying run.

$lastpage = $_server['http_referer']; echo '<script>alert("'.$lastpage.'")</script>'; // gives me url need. $_session['lastpage'] = $lastpage;

after content updated, i'm using window.location redirect previous page, so:

echo '<script>window.location="'.$_session['lastpage'].'"</script>'

the problem is, window.location directing me proper url, except it's missing colon in "http://".

when alert http_referer shown in code above, gives me total url, colon , all.

when seek utilize in window.location, strips out colon.

any ideas?

thanks!

why don't redirect php?

header("location: ".$_session['lastpage']);

php redirect server-side

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -