Get Variable to link
-
Hi there !
I got a little problem… Let me explain.
I create manually for each user of my website a private page that he and only he can see.
The addresses of the pages are created as is “https://exemple.fr/private/didier” Didier is the name/username of the user.
I wish I could include a button on the site (in a page) that will redirect the person who clicks a link:
“https://exemple.fr/private/$username”, “username” is replaced by usersame user who clicked.
So if Didier click on the button: “https://exemple.fr/private/$username”
the redirect link will be for him
“https://exemple.fr/private/didier “and if Geraldine clicks this link, it will be redirected to “https://exemple.fr/private/geraldine.”So I know that in theory i should create a function in PHP that will get $username (or equivalent) in the database and associate it with a keyword (or shortcode?) So in theory it would give something like :
[username] = Retrieve: “BDDUser/$username”
In theory, huh, I’m not a programmer I just have some basics bases. p
And then if I make a link to an image, or other button on the site that would “https://exemple.fr/private/%5Busername%5D” still theoretically it should give the function I want.
The trouble is that, as I said, I know not program and I have no idea what to do so rather than do something stupid I just ask a boost!
I hope I was clear enough!
Thank you! ??
- The topic ‘Get Variable to link’ is closed to new replies.