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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.