Give help. Get help.

  • # November 19, 2009 at 6:02 pm

    Hi People i was wondering if anyone could help me,

    I want to get a variable out of the address bar and use it with my database content selection as a hazardous guess i tried

    $page = $GET[‘pages’];

    SELECT * FROM database WHERE title=’$page’

    Before anyone says I know this is totally wrong but worth a try!

    Any help would be greatfully appreciated, or someone to point me in the direction

    Thanks In advance


    # November 19, 2009 at 6:54 pm

    It’s $_GET and don’t forget to addslashes() to anything you using a database query.

    $page = $_GET[‘pages’];

    SELECT * FROM database WHERE title=’ . addslashes($page) .’

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.