Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-17-2012, 07:04 PM   PM User | #1
Kaler40
New to the CF scene

 
Join Date: Oct 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Kaler40 is an unknown quantity at this point
id problems

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.
Kaler40 is offline   Reply With Quote
Old 10-18-2012, 09:04 AM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,261
Thanks: 10
Thanked 533 Times in 527 Posts
devnull69 will become famous soon enough
Please show us the relevant part of your code.
devnull69 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:06 PM.


Advertisement
Log in to turn off these ads.