Ask a Question related to Dreamweaver AppDev, Design and Development.
-
bethan81 #1
redirect?!?!?
Hi i am wondering if anybody knows how to redirect a user to another page if a
statement returns true? Here is the code, I am using PHP:
// check if database has content
if ($totalRows_login != 1)
{
echo'you are not logged in';
}
else{
echo ("addimage.php"); // clearly wrong, but how would i go about redirecting
the user to another page?
}
any help would be great
Bethan
bethan81 Guest
-
redirect to ..
hi, I have several page where you can edit the record When you modified the record you suppose to go where you came for example you can... -
redirect to guest if first redirect is doesnt work for a user
Hi all, I was wondering if anyone could help me solve a problem Once a user hits a certain webpage ..I try to redirect them to another using... -
How to Redirect?
I have a PHP script that waits for a file to appear, and then redirects to it. This works fine: <?php $filename = 'NewData.html'; while (!... -
[PHP] Redirect URL
Hi I have form in file register.php. The action of this form is the same - register.php the form validation script is included in this file like... -
Redirect to New Browser Window like Response.Redirect
That worked just fine for me as long as you put that open statement on one line rather than 2. "michel" <michely3k@yahoo.com> wrote in... -
JNadon #2
Re: redirect?!?!?
You could try this, it uses the header function.
[url]http://www.phpfreaks.com/quickcode/code/292.php[/url]
-Jason
JNadon Guest
-
Michael Fesser #3
Re: redirect?!?!?
.oO(bethan81)
header("Location: $url");>Hi i am wondering if anybody knows how to redirect a user to another page if a
>statement returns true?
exit;
where $url has to be an absolute address. You can use a predefined
variable to build it, e.g.
header("Location: http://$_SERVER[HTTP_HOST]/yourpage.html");
exit;
HTH
Micha
Michael Fesser Guest
-
Michael Fesser #4
Re: redirect?!?!?
.oO(JNadon)
The Location header requires an absolute address, so the code on that>You could try this, it uses the header function.
>
>[url]http://www.phpfreaks.com/quickcode/code/292.php[/url]
page is wrong. Additionally after setting the header the script should
be terminated using exit;, otherwise it will continue to run.
Micha
Michael Fesser Guest



Reply With Quote

