Page Redirect

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

Locked
sarbas
Forum Commoner
Posts: 64
Joined: Thu Jan 04, 2007 5:51 am

Page Redirect

Post by sarbas »

hai...
i want to redirect two pages from a php page using if... else.... condition is it possible?
if(...)
{
...
...example.php

}
else
{
...
example1.php

}

Thanks with regards
Sarbas :!:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

yes, it's possible. Why shouldn't it?
sarbas
Forum Commoner
Posts: 64
Joined: Thu Jan 04, 2007 5:51 am

Page Redirect

Post by sarbas »

hi volka,
i got some error while using that syntax.Can you provide me a correct syntax.

Thanks with Regards,
Sarbas :)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Code: Select all

if (...) {
	header(...);
}
else {
	header(...);
}
sarbas
Forum Commoner
Posts: 64
Joined: Thu Jan 04, 2007 5:51 am

Page Redirect

Post by sarbas »

Hi volka,

Thanks for your valuble reply. I'm new to php.

Thanks With regards
Sarbas :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Duplicating your threads is NOT allowed.
Locked