[PHP]index
<?php
include ("conn.php") ;
require_once("t abs.php");
?>
<html>
<head>
<?php tabs_header(); ?>
</head>
<body>
<div style="width:60 0px;">
<?php tabs_start(); ?>
<?php tab( "Junior Colleges" ); ?>
<form id="form1" name="form1" method="post" action="dd2.php ">
<?PHP
$query = 'SELECT DISTINCT schName FROM schools';
//$query2='SELECT DISTINCT schLocation FROM schools';
$result = mysql_query($qu ery) or die('Query failed: ' . mysql_error());
echo "<select name=select value='' ><option>Plea se select</option>";
while($nt=mysql _fetch_array($r esult)){//Array or records stored in $nt
echo "<option value=$nt[schName]>$nt[schName]</option>";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
echo '<input type="submit" value="Yes" />';
?></form>
<?php tab( "PolyTechni c" ); ?>
This is the second tab.
<?php tabs_end(); ?>
</div>
</body>
</html>
[/PHP]
[PHP]Display result
<?PHP
include ("conn.php") ;
?>
<?PHP
$schName=$_Get['select'];
$query = "SELECT schName FROM schools where schName='$schNa me'";
$numresults = mysql_query($qu ery) or die ("<center>Could n't execute query</center>");
$row= mysql_fetch_arr ay($numresults) ;
echo $numresults;
echo $row;
print $schName;
echo '<br>';
echo "<center><h1>Se arch results for: " . $schName ." </h1></center>";
?>
[/PHP]
Error Message when supposed to display result:
Couldn't execute query
"); $row= mysql_fetch_arr ay($numresults) ; echo $numresults; echo $row; print $schName; echo '
'; echo "
Search results for: " . $schName ."
"; ?>
Any1 knows what is wrong with my statement??
<?php
include ("conn.php") ;
require_once("t abs.php");
?>
<html>
<head>
<?php tabs_header(); ?>
</head>
<body>
<div style="width:60 0px;">
<?php tabs_start(); ?>
<?php tab( "Junior Colleges" ); ?>
<form id="form1" name="form1" method="post" action="dd2.php ">
<?PHP
$query = 'SELECT DISTINCT schName FROM schools';
//$query2='SELECT DISTINCT schLocation FROM schools';
$result = mysql_query($qu ery) or die('Query failed: ' . mysql_error());
echo "<select name=select value='' ><option>Plea se select</option>";
while($nt=mysql _fetch_array($r esult)){//Array or records stored in $nt
echo "<option value=$nt[schName]>$nt[schName]</option>";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
echo '<input type="submit" value="Yes" />';
?></form>
<?php tab( "PolyTechni c" ); ?>
This is the second tab.
<?php tabs_end(); ?>
</div>
</body>
</html>
[/PHP]
[PHP]Display result
<?PHP
include ("conn.php") ;
?>
<?PHP
$schName=$_Get['select'];
$query = "SELECT schName FROM schools where schName='$schNa me'";
$numresults = mysql_query($qu ery) or die ("<center>Could n't execute query</center>");
$row= mysql_fetch_arr ay($numresults) ;
echo $numresults;
echo $row;
print $schName;
echo '<br>';
echo "<center><h1>Se arch results for: " . $schName ." </h1></center>";
?>
[/PHP]
Error Message when supposed to display result:
Couldn't execute query
"); $row= mysql_fetch_arr ay($numresults) ; echo $numresults; echo $row; print $schName; echo '
'; echo "
Search results for: " . $schName ."
"; ?>
Any1 knows what is wrong with my statement??
Comment