Jump to content

PHP - Javascript Questions, Must I use AJAX?


tsilenzio

Recommended Posts

I tried to use javascript code without having to load it between script tags (As in loaded from a js file) file like so:

 

<?php
// index.php
include("some/file.php);
?>

 

<?php
// file.php
?>
<html>
<head>
<title>Emtpy</title>
<script language="javascript" src="some/file.js"></script>
</head>
<body>
<script language="javascript" src="some/file.js2"></script>
</p>
</p>
</p>

<?php 
echo("Queries: " . $_SESSION['queries']);
?>

</body>
</html>

 

I was wodnering if its possible to get this to work without having to use ajax, if i do have to use ajax is there a tutorial i can use that shwos how to use javascript with it?

 

Also is ajax secure to use or are there alot of security issues i must worry about =/

Link to comment
https://forums.phpfreaks.com/topic/63434-php-javascript-questions-must-i-use-ajax/
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.