Re: If statement leading to another php page

From: Date: Tue, 30 Apr 2002 10:40:23 +0000
Subject: Re: If statement leading to another php page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95353@lists.php.net to get a copy of this message
In article <BCEJJDCJDPNBLGKFPAOBIEGJCBAA.baldey_uk@SoftHome.net>, baldey_uk@SoftHome.net says... > Hello all, > > How can i force a transfer to another php page from an if statement? > > I have been trying: > > if (condition){ > > echo "<A HREF=3D"www.link.com">Link</A>"; echo '<A HREF="www.link.com">Link</A>'; the parser will get confused with all the " Alternatively you can escape " in a double quoted string thus echo "<A HREF=\"www.link.com\">Link</A>"; > > } > else { > > something else > } > > without much luck, i keep getting parse errors. Thanks for anyhelp in > advance! But probably you really need header() to do an automatic redirect. See the manual for an example. -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#95353) next »