Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

quotes into web address

  • 12-09-2007 2:54pm
    #1
    Registered Users, Registered Users 2 Posts: 91 ✭✭


    i have a php string that holds the value of a name. so it could possibly be something like o'connor etc. i know of the stripslashes($str) function which is fine and it gets rid of the value on the current page so that when you're doing searches in SQL databases it checks them correctly. however i need to put this same value into a link for previous and next pages. currently i have

    echo "<a href='employee.php?kw=".($name)."&dpt_id=".($dpt)."&sortby=".($sortby)."&page=".(page +1)."'class='text>Next>></a>";

    for the link to each next page


    but if you put in o'c as the value for the $name value then o\'c is now the value. Now the backslash is part of the $name and stops everything to the right of o\



    can #%39; help with this and how is it implemented?


Comments

  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    replace ' with %27

    You need to do a URL Encode. Not sure of the exact command in PHP is but it's definately there.

    When you use urlencode, it replaces the ' with %27. There's loads of them for spaces, underscores, etc.

    See: http://php.net/urlencode

    Rgds,

    Dave


Advertisement