Jump to content

Javascript in PHP?


prudens

Recommended Posts

javascript is a client-side language, php a server-side language

 

use instead

 

<?php

if (array_key_exists('HTTP_REFERER', $_SERVER)) {
   header('Location: ' . $_SERVER['HTTP_REFERER']);
} else {
   echo "<a href=\"#\" onclick=\"javascript:history.go(-1);\">click here to go back</a>";
}

?>

Link to comment
https://forums.phpfreaks.com/topic/94010-javascript-in-php/#findComment-481626
Share on other sites

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.