Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: id problems
10-17-2012, 07:04 PM #1
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
can anyone help. I have code that reads an sql database(data.php) and a .js page that has a function that uses $.get.json and pulls the information from the data.php page which is then appended to divs on my site pages. This works fine with a basic select* from tablename in the data.php page.
My problem is that I was wanting to use a select satement such as "Select * from tablename where tablefield="$id". Id needs to be the page id, i.e perthcolege has id of 1 in databse so perth college main page id is 1.
I have tried to input this id onto the data.php using both php GET and also session variable. The problem is as soon as I put any item onto data.php to reference the page the details from the database are not displayed onto the page. Can anyone advise me how I can get the page variable id to work on the data.php page.
Just to clarify data.php calls the data in a function and calls the function on the data.php page. Data.php is referenced via the .js page and the js function is referenced in the appropriate college page. Any help would be appreciated.
10-18-2012, 09:04 AM #2
- Join Date
- Dec 2010
- Thanked 565 Times in 558 Posts
Please show us the relevant part of your code.