First of all let me say thank you to everyone that offered answers...I have definitely advanced and even on my local machine everything is working perfectly.
However it's not working on the server. I tried a bunch of things such as putting session_start() into the included files but nothing has taken.
Rather than post the code here I've zipped up a few files:
http://nerotic.net/aux/code.zip
and you can see the site at the same URL removing /code.zip
index.php: has the AJAX in it... index_page_content.inc.php: is my file to determine which content gets included backend.php: the PHP to process the AJAX sound-how.php: one of the pages that gets included by index.php
The behavior is weird. It won't echo 'src' where I echo it, however it will display it where I'm echoing 'section'. But as soon as I reload it goes back to echoing 'section' in the exact same place.
Also, in Chrome every couple of links that I click on makes the entire page reload.
So if anyone can tell me what I'm doing wrong :)
Thanks in advance.
ORIGINAL POST
I'm new at PHP and relearning JS so any help would be appreciated.
<script language="JavaScript"
type="text/javascript">
$(document).ready(function() {
$("div.tabs").tabs(".images > div", {
// enable "cross-fading" effect
effect: 'fade',
fadeInSpeed: 600,
fadeOutSpeed: 1000,
// start from the beginning after the last tab
rotate: false
// use the slideshow plugin. It accepts its own> configuration
}).slideshow({autoplay: false, interval:5000});
$("a.lnav").onclick(function() {
// Get the ID of the link
var src = $(this).attr("id");
alert(id);
// Send Ajax request to backend.php, with src set as "id in> the POST data
$.post("/backend.php", {"id": src});
});
}); </script>