|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Pains with redirecting
Please can somebody settle for me the problem I have with redirecting users from a page to another php page.Coming largely from an ASP background I am used to sending users from a page I merely use for inserting into or updating a database, to another that tells them the status of their recent actions, just by using:
Response.Redirect Is there an equivalent in php?I tried: header ("Location:http://www.abc.net"); and it fails woefully each time. |
|
#2
|
|||
|
|||
|
Code:
<script type="text/javascript"> location.href = "www.abc.com"; </script>
__________________
-- Jason |
|
#3
|
|||
|
|||
|
Put the following code into a file called 'redirect.php'
PHP Code:
call it like this: http://redirect.php?to=http://www.yahoo.com or in a script, set $sUrl = "http://www.yahoo.com/" then include "redirect.php";
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#4
|
|||
|
|||
|
The reason your redirect is not working may be that you have already tried to output some content before attempting the redirect. Are you getting "headers already sent" error?
PHP Code:
|
|
#5
|
|||
|
|||
|
Sorry, we should have tied up this post... I helped him get this together offline... all is well.
thanks, |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Pains with redirecting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|