Click here to get back home

Form field entry directs to diff URLs based on entry?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Form field entry directs to diff URLs based on entry? AtomicBob 04-29-2006
Posted by AtomicBob on April 29, 2006, 2:27 pm
Please log in for more thread options


I have been given an interesting task:

Make a page with a single form field, which is to take a name (first
and last), and regardless of case or whether there is a space between
the first and last name, when the user hits the submit button it takes
them to a URL that has been assigned to that name.

Example 1:

user enters "Tony Tiger" in the field and hits submit.

user is then sent to tonytiger.exampledomain.com.

Example 2:

user enters "johnnywalker" in the field and hits submit.

user is then sent to johnnywalker.exampledomain.com.

Thanks very much for any advice!


Posted by Martin Jay on April 29, 2006, 3:25 pm
Please log in for more thread options


>I have been given an interesting task:
>
>Make a page with a single form field, which is to take a name (first
>and last), and regardless of case or whether there is a space between
>the first and last name, when the user hits the submit button it takes
>them to a URL that has been assigned to that name.

I've upload something to get your started to:
<http://www.spam-free.org.uk/pages/login.zip>.

It's a bit basic, and you might want to think about what should happen
if someone enters a name that doesn't exist.

Presumably this is for a referrals type application and security isn't
an issue.
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 432 5180

Posted by Luigi Donatello Asero on April 29, 2006, 3:26 pm
Please log in for more thread options



> >I have been given an interesting task:
> >
> >Make a page with a single form field, which is to take a name (first
> >and last), and regardless of case or whether there is a space between
> >the first and last name, when the user hits the submit button it takes
> >them to a URL that has been assigned to that name.
>
> I've upload something to get your started to:
> <http://www.spam-free.org.uk/pages/login.zip>.
>
> It's a bit basic, and you might want to think about what should happen
> if someone enters a name that doesn't exist.


What do you think it would happen?


--
Luigi Donatello Asero
https://www.scaiecat-spa-gigi.com/sv/faktaomitalien.php
今天二零零六年四月二十九日
星期五六






Posted by Martin Jay on April 29, 2006, 3:40 pm
Please log in for more thread options


>> >I have been given an interesting task:
>> >
>> >Make a page with a single form field, which is to take a name (first
>> >and last), and regardless of case or whether there is a space between
>> >the first and last name, when the user hits the submit button it takes
>> >them to a URL that has been assigned to that name.

>> I've upload something to get your started to:
>> <http://www.spam-free.org.uk/pages/login.zip>.
>>
>> It's a bit basic, and you might want to think about what should happen
>> if someone enters a name that doesn't exist.

>What do you think it would happen?

It depends how the server is configured: visitors may get a 'server not
found' error, a 404 error, a default page, or maybe something else.

The script could be modified to deal with unexpected names, either by
looking names up in a database or checking them against a list. Or they
could be hard-coded into it. :(
--
Martin Jay

Posted by Luigi Donatello Asero on April 29, 2006, 4:03 pm
Please log in for more thread options



> >> >I have been given an interesting task:
> >> >
> >> >Make a page with a single form field, which is to take a name (first
> >> >and last), and regardless of case or whether there is a space between
> >> >the first and last name, when the user hits the submit button it takes
> >> >them to a URL that has been assigned to that name.
>
> >> I've upload something to get your started to:
> >> <http://www.spam-free.org.uk/pages/login.zip>.
> >>
> >> It's a bit basic, and you might want to think about what should happen
> >> if someone enters a name that doesn't exist.
>
> >What do you think it would happen?
>
> It depends how the server is configured: visitors may get a 'server not
> found' error, a 404 error, a default page, or maybe something else.
>
> The script could be modified to deal with unexpected names, either by
> looking names up in a database or checking them against a list. Or they
> could be hard-coded into it. :(
> --
> Martin Jay

Do you mean that if an user should fill in a form like this
https://www.scaiecat-spa-gigi.com/sv/formularet.html
and write a name
which does not exist, this user would get a 404 error?!

--
Luigi Donatello Asero
https://www.scaiecat-spa-gigi.com/sv/faktaomitalien.php
今天二零零六年四月二十九日
星期五六




Similar ThreadsPosted
Text entry with non-European scripts December 22, 2006, 2:00 pm
Horizontal CSS list, last entry right-aligned? April 11, 2008, 3:01 pm
Making default entry in search text box disappear on click June 30, 2005, 4:10 am
Prepopulating form field August 24, 2006, 3:32 am
Restoring OTHER form field after submit September 23, 2005, 1:43 am
How to sort form field data in E-mail? December 21, 2005, 9:03 am
Is there a way to enter text into an HTML Form edit field January 29, 2005, 5:42 pm
Dynamic width of a text input field in a form November 8, 2005, 6:35 am
Correct form for file:// URLs (or why don't they work in Firefox?) January 13, 2005, 9:37 pm
Loss of Form field contents when the browser BACK button is pressed November 25, 2004, 4:57 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap