Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » OTO Redirect Code Placement


OTO Redirect Code Placement

Reply
  #1 (permalink)  
Old 07-23-09, 06:19 PM
Tony S. Tony S. is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 43
Thanks: 8
Thanked 0 Times in 0 Posts
OTO Redirect Code Placement

Hi Everyone,
I hope you all are doing well today. You all have been very helpful to me I want to first thank you before I ask for some more help. I am new to any kind of codeing and what I need to know today is, I want to redirect users directly after registration to a "one time offer page" so what i need to know is A. what type of code or script is this? B. Where in this code would I insert this code to have it redirect the user successfully to a OTO. The redirect code is: "<meta HTTP-EQUIV="REFRESH" content="0; url="http://www.mydomain.com/one-time-offer.php">"

The registration page template code Is: " %%TEMPLATE:header_clean%%
HTML Code:
<center>
<table border="0" width="80%">
        <tr>
                <td valign="top" bgcolor="#F7F9D2">
                <blockquote>
                <p><br>
                 <b><font color=navy size=2 face=arial>Registration Complete!</font></b>
                 <p>
                  <font color=black size=2 face=arial>
                  You have succesfully registered. Please login your account:
                  </font>

<form action=pm.cgi method=post>
<input type=hidden name=action value=login>
<TABLE BORDER=0>
<p align=left>
	<tr><td>
	<font size="2" face="Verdana">Login Name: </font>
	</td><td>
	<input type=text color=grey name=login size=25 value=%%login%%>
	</td></tr>
	<TR><TD>
	<font size="2" face="Verdana">Password: </font></td>
	<td>
	<input type=password color=grey name=password value=%%password%% size=25>
	</td></tr>
</table>
<p><input type="submit" name="submit" value="Submit"></p>
</form>
               <p>
                </blockquote>
                </td>
        </tr>
</table>
</center> 
%%TEMPLATE:footer_clean%%"

I am not sure where I should place the redirect code i know it should be placed in the <head> but were exacly wuld you place it? Again the re direction code I have is: "<meta HTTP-EQUIV="REFRESH" content="0; url="http://www.mydomain.com/one-time-offer.php">"

Can anyone help?
Thank You,
Tony S

Last edited by Nico; 07-24-09 at 03:17 AM.
Reply With Quote
  #2 (permalink)  
Old 07-24-09, 12:46 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
Quote:
redirect users directly after registration
I would use
PHP Code:

header('location:one-time-offer.php'); 

after the registration has been processed.

You could pass some sort of id or check on a session variable to ensure the person does not try to return to the page for additional offers.
Reply With Quote
  #3 (permalink)  
Old 07-24-09, 03:05 PM
sushi4664's Avatar
sushi4664 sushi4664 is offline
Aspiring Coder
 
Join Date: Apr 2007
Location: USA
Posts: 411
Thanks: 0
Thanked 0 Times in 0 Posts
Regarding wirehopper's answer: That is off course assuming you are using PHP, which would be my choice. Your meta redirect will not work because it will redirect users without them having even pressed submit. Google "php forms" and many builders will come up for your aid. What you will do is put wirehoper's code near the end of the code when all the processing is done.
__________________
- sushi
Visit http://napkinz.com/index.php - web comic that is update weekly

-ps: got through the archive...there are really funny comics in there....
Reply With Quote
  #4 (permalink)  
Old 07-24-09, 03:54 PM
Tony S. Tony S. is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 43
Thanks: 8
Thanked 0 Times in 0 Posts
Hello sushi4664,
Thanks for your help. as I stated I no really nothing about coding I am Ttrying to learn . Could You look at the code and tell me where and what I could do to redirect the user to A soecific page after they have clicked the submit button of the registration page?
Reply With Quote
  #5 (permalink)  
Old 07-24-09, 04:09 PM
Tony S. Tony S. is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 43
Thanks: 8
Thanked 0 Times in 0 Posts
OTO Redirect Code Placement

Also would there be a problem if I redirected to .html page with the registration template that i am using?

Last edited by Tony S.; 07-24-09 at 04:11 PM.
Reply With Quote
  #6 (permalink)  
Old 07-24-09, 07:05 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
You can redirect to an HTML page, but unless you have some sort of checking on the page, people can go there repeatedly.
Reply With Quote
  #7 (permalink)  
Old 07-25-09, 09:24 AM
Tony S. Tony S. is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 43
Thanks: 8
Thanked 0 Times in 0 Posts
Thank you wirehopper, you have been a big help.

Tony S.
Reply With Quote
  #8 (permalink)  
Old 07-25-09, 09:31 AM
Tony S. Tony S. is offline
Newbie Coder
 
Join Date: Jul 2009
Posts: 43
Thanks: 8
Thanked 0 Times in 0 Posts
I think I have what I need to finish this project. Thank you all for all of your support.

Tony S.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl LWP loses html code?! jialanw Perl 22 04-13-09 02:14 PM
how to handle search function code.. Miben PHP 5 03-24-09 12:56 AM
Need captcha for html+php contact form sujata_ghosh PHP 6 03-22-09 03:46 PM
Redirect code in this login form code. Dreadlox PHP 2 12-15-08 05:27 AM
protecting code in PHP ckb PHP 12 01-02-04 08:53 AM


All times are GMT -5. The time now is 09:07 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.