We plan to use this script
we want to add the javascript
<script type="text/javascript" src="
where it says
//any javascript can go in here
Can some one suggest how to do it.
TIA
Code:
How To Hide Your JavaScript With PHP!
On the page where the JavaScript is placed, add:
<?
session_start();
if (!isset($_SESSION['access'])){
$_SESSION['access'] = true;
$access = true;
}
?><html>
<head>
<script language="JavaScript" src="script.php"></script>
</head>
<body>
Body goes here...
</body>
</html>
And now create a new file called script.php and place your JavaScript there:
<?
session_start();
if($access)
{
header("Content-type: text/javascript");
?>
//any javascript can go in here
alert("woohoo it works at last!");
<?
$access = false;
}
?>
we want to add the javascript
<script type="text/javascript" src="
where it says
//any javascript can go in here
Can some one suggest how to do it.
TIA