General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 6th, 2004, 05:52 PM
rpan rpan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 10 rpan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
headache with header() Bizaarrrr!

I did a
header("refresh: 2; url = http://" . $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/loggedin.php");

the first time it went to the right page - loggedin.php; but since I did not have such a page. It came back with page-not-found.

Next I put loggedin.php in the right place. and this time I see the redirect went to ....../index.php!!!
WHY? now no matter what I do, the redirect always goes to ....../index.php!! Nowhere in my script tells the redirect to go to index.php!!! weird...

What have I done wrong here? I am pulling my hair out, pls help!

Robert

Reply With Quote
  #2  
Old April 7th, 2004, 12:05 AM
crudesys crudesys is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: California
Posts: 25 crudesys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

hi, maybe your loggedin.php has the redirect to index.php

just a thought

Reply With Quote
  #3  
Old April 7th, 2004, 10:24 AM
Spongy's Avatar
Spongy Spongy is offline
Alternately High
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Hilversum, Netherlands
Posts: 223 Spongy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 56 m 41 sec
Reputation Power: 5
Send a message via MSN to Spongy
Quote:
Originally Posted by crudesys

just a thought



Was thinking the same thing.
Post some code when it's not there.
__________________
Work to live, don't live to work

Reply With Quote
  #4  
Old April 9th, 2004, 04:37 PM
rpan rpan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 10 rpan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

Oh sorry guys I just found out what caused it... It got redirected twice,
as a result I was finally redirected to index.php... This is a good learning
experience as I am very new to PHP (3 weeks all together!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > headache with header() Bizaarrrr!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT