Saturday, 17 August 2013

Using ASP to redirect user to new folder

Using ASP to redirect user to new folder

I know the heading sounds simple and I hope the answer is but I am new to
ASP and cannot figure this one out. I am makeing a form which submits a
user name to access.asp
<form name="input" action="access.asp" user="" method="get">
Username: <input name="user" type="text" />
<input value="Submit" type="submit" /></form>
What I want to actually achieve is when someone types a user name into the
form and clicks submit, I want the form to move them to the next
subdirectory with that user name.
ie. username=thomas then they are redirected to a folder
http://www.whatever.com/thomas/
ie. username=samantha then they are redirected to a folder
http://www.whatever.com/samantha/
and so forth. the folder would default for an index.html file or a 404
file if the entered username directory does not exist. I am trying not to
create a database file unless this is required. I will only have 5-10
username directories when I am done.
Any help would be appreciated.
Thanks, Erik

No comments:

Post a Comment