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 3797470
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:24:32+00:00 2026-05-19T13:24:32+00:00

i have a database with many items in there, by the moment my users

  • 0

i have a database with many items in there, by the moment my users retrive info from the database using a simple php script who use GET parameters, like http://www.mypage.com/post.php?id=123432

Well at the beginning it was all fine, but know i have Ids that are very big (10000000). So at this point i dont my users to have that longs urls, so i think that changing the secuence of number for a secuence of leters will do the think, like post.php?id=XFBJ and then the php script knows that is the id=11223256437 for example. Any ideas of how to do this? Thanks!

  • 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-19T13:24:33+00:00Added an answer on May 19, 2026 at 1:24 pm

    I suppose you could do very simple trick to achieve that. Treat ID from URL as 36-based number and convert it to 10-based number before retrieving from database.

    $_GET['id'] = '5yc1s';
    $id = base_convert($_GET['id'], 36, 10); // 10000000
    
    // SELECT ... FROM ... WHERE id = :id [id = $id]
    

    And when you want to display a link do the opposite:

    $id = 10000000;
    $urlId = base_convert($id, 10, 36); // 5yc1s
    
    // ...?id=$urlId
    

    EDIT: Oh, base_convert() has upper limit of 36 (a-z0-9), not 32 – that makes your links even shorter. Of course you could write your own function that could convert up to 62-based numbers (a-zA-Z0-9) — that’s a reasonable upper limit (of course even higher are available). Writing such a function is really easy.

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

Sidebar

Related Questions

I have many items and many users in a database. A user can set
Many applications have grids that display data from a database table one page at
I have a INVENTORY table. There are many items inside. When I query it,
I have a form that allows users to insert items in a database. A
I have a Database storing details of products which are taken from many sites,
I have this syntax for grabbing some data from database, I using codeigniter's active
I have database with many tables. In the first table, I have a field
I have a database that many different client applications (a smattering of web services,
I have an access database with many tables. I am looking for a field
Sometimes you need to upgrade the database with many rows that you have in

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.