/    Sign up×
Community /Pin to ProfileBookmark

Redirecting to particualr page from data from a field

Hi

I am trying to set up a redirection button from my main page and am struggling to find any help on the code needed. All I need is for a user to input a number of the directory they are after ie 46573 and then the index page in the said directory to load up. I need to somehow take the data from the unsername field and add it to the redirect code. There is no need for any security in this process. I have spend hours on trying to find how to do this but it doesn’t seem to be used or needed much as there are no comments on how.

Examples:

username : 46573

which would then redirect to

[url]www.mywebsite.co.uk/46573[/url]

next person may be

username : 99872

which would then redirect to

[url]www.mywebsite.co.uk/99872[/url]

Thanks in advance for any help…….

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@cbVisionOct 05.2012 — Very simple with some javascript. Here's an example:

http://jsfiddle.net/dfreema1/LtY9J/1/

Obviously, the URL's aren't set up here, so it fails. But if you copy the code to your site, you should be able to simply type in the 894129 (username) into the box.
Copy linkTweet thisAlerts:
@AndyPaulauthorOct 05.2012 — Worked a treat !,

Thank You
×

Success!

Help @AndyPaul spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...