Current location: Hot Scripts Forums » Programming Languages » PHP » Certain Redirect


Certain Redirect

Reply
  #1 (permalink)  
Old 08-16-08, 03:31 PM
Ishmell Ishmell is offline
Newbie Coder
 
Join Date: Jul 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Certain Redirect

Whats the best way to redirect someone i they came from a certain page.

Like lets say they came from a page called index3.php to a page called here.php and I want them to redirect back to index3.php. But I dont want them to redirect to index3.php if they didnt come from that page.
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 08-16-08, 06:21 PM
leeprice2006 leeprice2006 is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

if(basename($_SERVER['HTTP_REFERER']) == 'index3.php'){
      
header("location: index.php");

put that at the top of here.php
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
Domain Redirect. Hunter PHP 2 06-27-07 02:04 PM
please help me with redirect page Hoangsts ASP 3 12-08-06 09:58 AM
Redirect Script. RossC0 JavaScript 2 02-10-05 06:02 AM
Redirect previous 2 pages after login mcrob PHP 5 01-01-05 08:35 AM


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