Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: id problems

  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,396
    Thanks
    12
    Thanked 569 Times in 562 Posts
    Please show us the relevant part of your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •