This is a simple dropdown list test .html file that is not working. Neither with a simple php echo test on 7th line. Both php script doesn't show at all on execution.
I suppose something went wrong on my apache or php configuration. I use Apache 2.x, PHP 4.x on Windows 98.
<html>
<head>
<title>New Page 1</title>
</head>
<body>
<p>Dropdown Test - Education</p>
<?php echo("Yahooo"); ?>
<form method="POST" action="test.php">
Pendidikan : <select size="1" name="Pendidikan">
<script language="php">
include "./common_db.inc";
$link_id = db_connect('pasi');
$query = "SELECT * FROM master_pendidikan";
$result = mysql_query($query) or die (mysql_error());
if(mysql_num_rows($result)) {
while($row = mysql_fetch_row($result))
{
print("<option value=\"$row[0]\">$row[1]</option>");
}
} else {
print("<option value=\"\">No data</option>");
}
</script>
</select></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
Any suggestion ?
I suppose something went wrong on my apache or php configuration. I use Apache 2.x, PHP 4.x on Windows 98.
<html>
<head>
<title>New Page 1</title>
</head>
<body>
<p>Dropdown Test - Education</p>
<?php echo("Yahooo"); ?>
<form method="POST" action="test.php">
Pendidikan : <select size="1" name="Pendidikan">
<script language="php">
include "./common_db.inc";
$link_id = db_connect('pasi');
$query = "SELECT * FROM master_pendidikan";
$result = mysql_query($query) or die (mysql_error());
if(mysql_num_rows($result)) {
while($row = mysql_fetch_row($result))
{
print("<option value=\"$row[0]\">$row[1]</option>");
}
} else {
print("<option value=\"\">No data</option>");
}
</script>
</select></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
Any suggestion ?