Tech Support Forum banner

Redirect url and add new ID every time

1581 Views 1 Reply 2 Participants Last post by  Laxer

I am a beginner as trying to get a phpfile to redirect to a another url, but also to change a part of the url adress in the php every time its clicked on.
So on the website its a textlink <a href="www.playnow.php">PLAY NOW</a> and the www.playnow.php should redirect the user to the downwards url + changing a part of the url (XXXXXXXXXXXXXXXX in the link down wards).
In this I want the XXXXXXXXXXXXXXXX to be a number as autochange the number everytime someone click <a href="www.playnow.php">PLAY NOW</a> so the number never are the same. The number can be short or long.

The link adress in the playnow.php is:

So its the XXXXXXXXXXXXXXXX as need to be a number and autochange.

Anyone as know how to do this?
Not open for further replies.
1 - 1 of 2 Posts
there would be no way to make sure the numbers are different unless you set up a database.

I suggest setting up a DB with 3 fields: ID, IP, Timestamp

when they click "Play Now" have it loop to see if their IP exists, if it does assign then that ID and update the time stamp. If it doesn't create a new ID.

Does that make sense?
1 - 1 of 2 Posts
Not open for further replies.