Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6980845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:04:46+00:00 2026-05-27T18:04:46+00:00

ok, so i have some links that will be generated for some ads on

  • 0

ok, so i have some links that will be generated for some ads on my website via php. Now the problem i have is simply i understand how md5 works and it’s not an encryption and it can not be re-rendered in its rarest form….. i have some mysql ids that i want to use as the data to select witch ad to query the database for , but i do not want my users to have access to the ads id….. so i was hoping someone could show me how to use the hash/salt method in this case…..
Please note: i have been looking through this site for this answer and i see people time and time again say salt/hash is not encryption i understand that but its not as simple to attempt to hack my site if the links were hashed as they would be if they were just simple integers.

php script:

<?
function SuperAd($id){
    $sql = mysql_query("SELECT * FROM `ads` WHERE `id`= $id");
    while($ad = mysql_fetch_array($sql)){
        $title = $ad['title'];
        // here is where i want to encrypt 
        $adlink = $ad['id'];
    }
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:04:46+00:00Added an answer on May 27, 2026 at 6:04 pm

    Adding salt is just a securer addition to hashing. And hashing is one way only. It sounds like you want some way of encrypting your $ad['id'], so that instead of users seeing:

    /viewad/1/

    they see:

    /viewad/12lk3jx09c8faf/

    right?

    Just Google for some quick encryption / decryption algorithms.

    EDIT: Here is a quick S.O. question that may help you:

    Best way to use PHP to encrypt and decrypt passwords?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have some guidelines or links to articles when designing a website that
I have a table generated from some PHP code that lists a SMALL amount
I have an update panel on my page with some links that have onClick
I have some jQuery code that intercepts links clicked on a page: $(document).ready(function() {
I have some text that has HTML hyper-links in it. I want to remove
I have a HAML page that lists some links to delete things that looks
O.K. I think that's an easy one! I have a ViewMasterPage with some links
I have some code right now that executes when a link is clicked. The
I have some viewdata that is generated by going through my repository to the
I have a huge file that has some lines that need to have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.