homepage Welcome to WebmasterWorld Guest from 23.20.44.136
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Send user to URL
If statement
Adam5000




msg:4218683
 6:35 am on Oct 19, 2010 (gmt 0)

I'm trying to send a user to a new page using an IF statement.

It looks something like this.

<?php

$a=oranges

if($a==oranges)
{
Send user to www.homepage.com
}

?>

Help!

 

enigma1




msg:4218688
 6:47 am on Oct 19, 2010 (gmt 0)


<?php
$a=oranges;
if($a==oranges)
{
header("location: http://www.example.com");
exit();
}
?>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved