This is a section from a working logon script. We want to redirect to different URL’s based on the text in an existing database field. Don’t get any error msgs, jus blank page. Thanks for helping a rank amateur!
[php]
<?php session_start(); if(!session_is_registered(email)){ header("location:johnlogin1.php"); } if ($user->logged_in) { $query = "SELECT * FROM orders"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); echo $row['description']; } if($description=='monkey') // condition for one keyword { $url='http://www.monkey.com'; // url or page to redirect on keyword header('Location:$url'); } if($description=='banana') // condition for other keyword { $url='www.banana.com'; header('Location:$url'); } ?>[/php]