1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Safe Querystring Encoding and Decoding??

Discussion in 'PHP & Perl' started by digitalpower, Jan 31, 2009.

  1. digitalpower

    digitalpower BANNED BANNED

    Joined:
    Dec 16, 2008
    Messages:
    303
    Likes Received:
    69
    I was wondering if the following is possible...

    1) A textbox is on the screen and someone enters text like "Sample Text".
    2) The text "Sample Text" gets encoded safely so it can appear in a querystring and not be tampered with.
    3) Text can be decoded safely from the querystring. If the text is tampered with in any way, the decoding process will know this and will raise a flag / display an error etc.

    How can I do this in PHP?
     
  2. abismal

    abismal Newbie

    Joined:
    Jan 18, 2009
    Messages:
    9
    Likes Received:
    1
    Occupation:
    IT
    try be more specific :) You can base64 encode/decode a string, but you need to compare it against something. Follow my thought ?
     
  3. onegg

    onegg Junior Member

    Joined:
    Dec 12, 2007
    Messages:
    147
    Likes Received:
    176
    Location:
    In your mind
    learn md5 with php, this may help you