redirecting in php

Thread Solved

Join Date: Jul 2009
Posts: 45
Reputation: AirGear is an unknown quantity at this point 
Solved Threads: 2
AirGear AirGear is offline Offline
Light Poster
 
0
  #21
25 Days Ago
guys, today i tried to install the same wamp in other PC. and surprisingly, it works there!! guess the wrong thing is my PC now, or maybe the setting of the apache or php. do you have any ideas?
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 15
Reputation: violarisgeorge is an unknown quantity at this point 
Solved Threads: 3
violarisgeorge's Avatar
violarisgeorge violarisgeorge is offline Offline
Newbie Poster
 
0
  #22
25 Days Ago
Originally Posted by AirGear View Post
guys, today i tried to install the same wamp in other PC. and surprisingly, it works there!! guess the wrong thing is my PC now, or maybe the setting of the apache or php. do you have any ideas?
Try uninstalling WAMPServer and reinstalling it. Sometimes a bad download leaves PHP handicapped. Also check if the PHP version is the newest one.

Also, even if you have the server online you might have not started the services properly. Check all that just to make sure. Other than that, your code works fine (if you have also followed guidelines by the previous posters as well).
I take your reality and substitute my own
violarisgeorge.com
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 45
Reputation: AirGear is an unknown quantity at this point 
Solved Threads: 2
AirGear AirGear is offline Offline
Light Poster
 
0
  #23
25 Days Ago
guys, i know this sounds strange. but that header finally works after i added php in <?php
haha, i don't know that the word "php" will affect that much.
anyway, thx so much guys. in return, i would like to help you if you have some problem with cpp, i love programming in cpp
once again, thanks so much all.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 966
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 127
ardav's Avatar
ardav ardav is offline Offline
Posting Shark
 
-1
  #24
25 Days Ago
Originally Posted by sam023 View Post
Try this
  1. <?php
  2. header("Location:yahoo.com");
  3. ?>

it can be possible that short tags are off in php.ini. So Try once the above code.!!
Yep, sam023 did mention it.
"...the woods would be a very silent place if no birds sang except for the best"
All opinions count - unless you're a serial downvoter.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 45
Reputation: AirGear is an unknown quantity at this point 
Solved Threads: 2
AirGear AirGear is offline Offline
Light Poster
 
0
  #25
25 Days Ago
yes, i didn't notice that
a huge thanks for sam023 for the solution and ardav for helping me with your ideas
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: rokape is an unknown quantity at this point 
Solved Threads: 1
rokape rokape is offline Offline
Newbie Poster
 
0
  #26
25 Days Ago
  1. <?
  2. session_destroy();
  3. header("Location: http://www.yahoo.com");
  4. exit;
  5. ?>

That should work
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 966
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 127
ardav's Avatar
ardav ardav is offline Offline
Posting Shark
 
-1
  #27
25 Days Ago
@rokape - it's SOLVED!!
"...the woods would be a very silent place if no birds sang except for the best"
All opinions count - unless you're a serial downvoter.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: rokape is an unknown quantity at this point 
Solved Threads: 1
rokape rokape is offline Offline
Newbie Poster
 
0
  #28
25 Days Ago
I missed that bit
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: mjtcolo is an unknown quantity at this point 
Solved Threads: 0
mjtcolo mjtcolo is offline Offline
Newbie Poster
 
-1
  #29
25 Days Ago
Is that code you pasted the entire PHP program / script? What you are doing needs to be the first thing sent to the browser, for instance.
Just a retired IT geek
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 105
Reputation: sam023 is an unknown quantity at this point 
Solved Threads: 2
sam023 sam023 is offline Offline
Junior Poster
 
0
  #30
25 Days Ago
great finally u got the output..!!!

In WAMP. 'short_open_tag' is off by default..!!

but you can ON it by going in php.ini and search for word 'short_open_tag'. make it ON.. and restart the wamp server..!!

then you can use short tags..!! means u can use <? ?> instead of <?php ?>


Best of Luck
Last edited by sam023; 25 Days Ago at 1:04 am.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC