Hey there,
I am developing a website in PHP. I am not great at javascript, and have been playing around with javascript/AJAX.
I have a news page, and I am using a JS/Ajax pagination script off dynamic drive. It has an external .js file, and in that file the code that controls what is on each page is something like
"page1.php","page2.php","page3.php" etc...
Now that is all fine and dandy BUT I want the amount of pages to depend on the amount of news from a mysql database....
I can use php, mysql, and a while loop to get a variable as follows:
$links="\"page1.php","page2.php",....."pagex.php\""
How can I then use this in the .js file to create 'x' pages..
When I simply put the php code in the js file nothing happens.
Hope that makes sense. Help greatly appreciated..
Bookmarks