HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
redirect customers to their pages
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
georgia



Joined: 03 Mar 2008
Posts: 1

PostPosted: Mon Mar 03, 2008 5:05 pm     redirect customers to their pages Reply with quote

can someone give me the correct code (html) to rediect my costomers to their own pages when they type in their unique customer number.
I have customers that buy online and cant seem to put together the right codes to get them to them.
All I want is this.
Type in customer number #BBA1001 click ok button
then it opens a link to their page

I dont need for them to chooses passwords or anything like that as I give them their customer number

My page is called Customers online
www.begavalleyembroidery.webs.com
Realy stuck and getting more confused each day
Thank you to anyone who can advise me
Georgia Embarassed
kanenas



Joined: 14 Dec 2004
Posts: 191

PostPosted: Sun Mar 16, 2008 9:23 am     Simplest method: set "action" field Reply with quote

Suppose a customer's page is created by a script, as opposed to (e.g.) a static page. Further, suppose the URL for the script is "http://www.begavalleyembroidery.webs.com/customer" and uses the field "ID" to select which customer's page to serve up.
Code:
<form action="/customer" method="GET">
  <input name="ID" value="" />
  <input type="submit" value="go to"/></form>
</form>

This is the preferred method, though usually the script would redirect to the actual user's page once it performed authentication.

If that doesn't work for you, you can try a javascript redirect. For example:
Code:
<script type="text/javascript">
function redirect(customerID) {
  // use 'window.location.protocol' in case customer wants to use HTTPS
  window.location.href=window.location.protocol+'//'
    +window.location.hostname+'/customer/'
    +escape(customerID);
  return false;
}
</script>
<form onsubmit="return redirect(this.ID.value);">
  <input name="ID" value="" />
  <input type="submit" value="go to" /></form>
</form>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial