header link problem
Posted: Fri Apr 01, 2011 12:01 pm
hi, php beginner here.
problem: below coding only linkable to header('Location:dr_fatimah_3111.php'); but can't link to -- header('Location:dr_fatimah_4303.php');.
why? whr the problem?
looking for someone who know the problem resolution to help me solve the problem.
thanks.
<?php
include 'Connections/myConnection.php';
mysql_select_db($database_myConnection, $myConnection)
or die("Unable to connect to MySQL");
$query = "SELECT code, name FROM dr_fatimah";
$result = mysql_query($query);
//text field
if(mysql_num_rows($result)) {
$result = mysql_query("SELECT name FROM dr_fatimah WHERE code='SMM3111' AND name='Multimedia Programming' ");
header('Location:dr_fatimah_3111.php');
}
else header('Location:dr_fatimah_4303.php');
?>
problem: below coding only linkable to header('Location:dr_fatimah_3111.php'); but can't link to -- header('Location:dr_fatimah_4303.php');.
why? whr the problem?
looking for someone who know the problem resolution to help me solve the problem.
thanks.
<?php
include 'Connections/myConnection.php';
mysql_select_db($database_myConnection, $myConnection)
or die("Unable to connect to MySQL");
$query = "SELECT code, name FROM dr_fatimah";
$result = mysql_query($query);
//text field
if(mysql_num_rows($result)) {
$result = mysql_query("SELECT name FROM dr_fatimah WHERE code='SMM3111' AND name='Multimedia Programming' ");
header('Location:dr_fatimah_3111.php');
}
else header('Location:dr_fatimah_4303.php');
?>