Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 06-11-2004, 11:57 AM   #1 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
PHP Redirect

What code should be used to redirect to the last visited page? (Coding is in php)
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 06-11-2004, 11:59 AM   #2 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
What do you mean by the last visited page? What exactly are you trying to do?
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-11-2004, 12:01 PM   #3 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Like for a rating system... I want the page after you voted to redirect back to the review you just looked at after about 5-10 seconds. So you press Rate! on a review, it takes you to a confirmation page, then that redirects to the review you were looking at before you rated for it...
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-11-2004, 12:08 PM   #4 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
well just use
<?php Header("Location: http://www.must-have-software.net/ratings.php?id=" . $id); ?>
You must have the id somewhere of where you rated it right?
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-11-2004, 12:11 PM   #5 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
You could use $referer = $_SERVER['HTTP_REFERER']; to store the referring page and then redirect to it.

This can also be done with JavaScript using the history code.
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-11-2004, 02:37 PM   #6 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
.php?id=29

That's how it ends (29 is just an example one)

Which one is easier, Spears way or imaginemn's way? I've see imaginemn's way a lot of places...
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-11-2004, 04:39 PM   #7 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
I personally don't think one is better than the other. Both ways should work about the same way. The only difference I can see is that if you are already calling the $id then that's probably the easier of the two because you don't have to call an additional server resource. The only time this would ever come into play is if you are getting millions a hit a day and your server cannot keep up.

Both are a good way to solve your issue.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-11-2004, 05:16 PM   #8 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Thanks. Would I put it exactly how theSpear has it now?
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2004, 07:49 AM   #9 (permalink)
Inactive
 
samer's Avatar
 
Join Date: 10-13-03
Location: Lebanon
Posts: 4,099
iTrader: 0 / 0%
Latest Blog:
None

samer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nice
HTML:
[code:1:5648d0859e]
<input type="button" value="Back" onclick="history.back()">
[/code:1:5648d0859e]
samer is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2004, 11:29 AM   #10 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Samer, I need it to redirect back automatically, What you have inserts a button right?
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-12-2004, 12:31 PM   #11 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,940
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Here is the code for my solution.

[code:1:0827f7fc84]<?php
// ----------------------------------------------------
// refresh / redirect to an internal page using Referer
// imaginemn solution
// ----------------------------------------------------

$ref = $_SERVER['HTTP_REFERER'];
header( 'refresh: 5; url='.$ref);

echo "You will be redirected to $ref in 5 seconds";
?>[/code:1:0827f7fc84]


OR


[code:1:0827f7fc84]<?php
// --------------------------------------------------------------
// refresh / redirect to an internal page using existing variable
// theSpear solution
// --------------------------------------------------------------

header( 'refresh: 5; url=ratings.php?id='.$id);

echo "You will be redirected to ratings.php?id='.$id in 5 seconds";
?>[/code:1:0827f7fc84]

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-14-2004, 09:56 AM   #12 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
The first one looks like it'll do. Thanks imaginemn. Does the $ref mean the referring page?
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 06-14-2004, 10:28 AM   #13 (permalink)
Inactive
 
samer's Avatar
 
Join Date: 10-13-03
Location: Lebanon
Posts: 4,099
iTrader: 0 / 0%
Latest Blog:
None

samer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nicesamer is just really nice
Quote:
Samer, I need it to redirect back automatically, What you have inserts a button right?
yep, sorry.
samer is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
301 redirect tdd1984 SEO Forum 14 06-06-2007 11:48 PM
301 redirect help!! offthedome Coding Forum 6 05-27-2007 10:13 PM
301 and 302 Redirect programmersbank SEO Forum 8 06-09-2006 01:57 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 08:36 PM.
© Copyright 2008 V7 Inc