Current location: Hot Scripts Forums » Programming Languages » PHP » Redirect code in this login form code.


Redirect code in this login form code.

Reply
  #1 (permalink)  
Old 12-11-08, 02:00 PM
Dreadlox Dreadlox is offline
New Member
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Redirect code in this login form code.

Hello, I was wondering were I would put a page redirect code in this login Form code after "Enter" or "submitting" and what would the code be.

My knowledge on coding is not extensive. I'm pretty much just trying to wing it here.

Thanks guys.

Code:
<form action="post.php" method="post" id="LoginForm" name="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNTU4OTgyNDc1ZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUnY3RsMDAkY3BNYWluJExvZ2luQm94JFJlbWVtYmVyX0NoZWNrYm94" />

</div>

            <input type="hidden" name="NextPage" id="NextPage" value=""  />
            					
            
            <p id="loginAttempts"></p>
            

			      <p><label id="ctl00_cpMain_LoginBox_Email_Textbox_Label" for="&lt;%= Email_Textbox.ClientID %>">Email:</label></p>
			      <p><input name="ctl00$cpMain$LoginBox$Email_Textbox" type="text" id="ctl00_cpMain_LoginBox_Email_Textbox" tabindex="1" /></p>
			      <p><label id="ctl00_cpMain_LoginBox_Password_Textbox_Label" for="&lt;%= Password_Textbox.ClientID %>">Password:</label></p>

			      <p><input name="ctl00$cpMain$LoginBox$Password_Textbox" type="password" id="ctl00_cpMain_LoginBox_Password_Textbox" tabindex="2" /></p>
    			  			  		  
			      
    	        
                    <div id="loginBtnWrap" class="clearfix">
                            <input name="ctl00$cpMain$LoginBox$Remember_Checkbox" type="checkbox" id="ctl00_cpMain_LoginBox_Remember_Checkbox" tabindex="4" value="on" class="rememberMe" /><label id="ctl00_cpMain_LoginBox_lblrememberMe">Remember Me</label>
                            
                            <div class="rightLgn"><div class="leftLgn"><input id="dlb" name="dlb" type="submit" onclick="javascript: return doSubmit();" value="Log In" tabindex="5" /></div></div>
                            						 	                
                            <input name="ctl00$cpMain$LoginBox$SingleSignOnHash" type="hidden" id="ctl00_cpMain_LoginBox_SingleSignOnHash" /><input name="ctl00$cpMain$LoginBox$SingleSignOnRequestUri" type="hidden" id="ctl00_cpMain_LoginBox_SingleSignOnRequestUri" /><input name="ctl00$cpMain$LoginBox$nexturl" type="hidden" id="ctl00_cpMain_LoginBox_nexturl" /><input name="ctl00$cpMain$LoginBox$apikey" type="hidden" id="ctl00_cpMain_LoginBox_apikey" /><input name="ctl00$cpMain$LoginBox$ContainerPage" type="hidden" id="ctl00_cpMain_LoginBox_ContainerPage" />
                    </div>
			      
                    <p class="small">
                    
						<a id="ctl00_cpMain_LoginBox_ForgotPassword_Hyperlink" href="http://collect.myspace.com/index.cfm?fuseaction=user.retrievepassword&amp;MyToken=7169651d-3ffb-4ad9-9db5-762ab5a03296">Forgot your password?</a>						    
                    </p>

                                  		                             
        </form>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 12-11-08, 02:04 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Can you post the PHP code? The HTML doesn't really help here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 12-15-08, 06:27 AM
maneetpuri maneetpuri is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

As per the HTML code you have pasted, after submitting this form you will be taken post.php. Now if you want to further redirect you can use

Header ("Location: URL");
exit();

in this replace URL with the URL to which you want the user to be re-directed.

Hope this helps!

Cheers,

~Maneet
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
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
ajax checking and onsubmit issue follower JavaScript 4 10-12-08 04:45 PM
simple redirect form? St8ic Script Requests 1 05-15-08 04:54 AM
Help with multiple user login and redirect Spotted_Doe New Members & Introductions 3 01-30-06 01:12 AM
redirect on form submit simone PHP 11 11-25-03 01:01 PM
asp: URGENT! need to change code to create new form per id seala ASP 2 09-09-03 10:54 PM


All times are GMT -5. The time now is 06:57 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.