how do i remove member number in url

Discussion in 'PHP' started by David Holland, Dec 11, 2010.

  1. #1
    /profile/47/Rezzer

    I want to remove the 47 the member numeber so urls read /profile/Rezzer


    any help would be grateful thanks
     
    David Holland, Dec 11, 2010 IP
  2. fr33lanc3

    fr33lanc3 Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The script is parsing the url to get the record id to know what profile to pull. It would depend on if is "Rezzer" a unique value in the database so that a record could be pulled back by the username. Then code would need to be rewritten to pull the record by username instead of id.
     
    fr33lanc3, Dec 11, 2010 IP
  3. David Holland

    David Holland Active Member

    Messages:
    155
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    90
    #3
    yes rezzer is a unique name, all user names are unique, so how do i do it?
     
    David Holland, Dec 11, 2010 IP
  4. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #4
    First locate the php file which handles the profile /profile/47/Rezzer

    if user name is unique then you will need to pass on "Rezzer" to the script instead of the number. change the script accepting the GET variable.
    of course you need to change the mysql query in the php code supporting the changes done.
     
    olddocks, Dec 12, 2010 IP
  5. backlinkneeded

    backlinkneeded Member

    Messages:
    285
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    Olddocks, you are a probro. keep up the good work.
     
    backlinkneeded, Dec 22, 2010 IP