how to redirect a page using the if else statement ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sathya
Forum Commoner
Posts: 72
Joined: Sat Dec 12, 2015 7:26 am
Contact:

how to redirect a page using the if else statement ?

Post by sathya »

Hi ,
I want to redirect the users when if statement got failed.like below

If (status=ok)
{
echo Execute the code here;
}
else
{
redirect to some other page// here I want to know the code for redirect the page
}

Thanks for reading this.kindly suggest the solution
Post Reply