Using our
PHP PHP PHP Tag
PHP TAG - is in Reply editor .... is in REPLY editor menu bar
Php can only be output by php self, as an echo of this php source
any page called 'pagename.php' and starting with
<?php
should only put out HTML code
So something is not right,
can be in:
- your script
- your page names
- your webserver settings
- your php.ini settings
<?php
// setup variables for db access
$db_name = "rvr";
$db_table = "rvr_service_employee";
$dbconnect = @mysql_connect("localhost") or die(mysql_error());
//connect to the db
$db = @mysql_select_db($db_name, $dbconnect) or die(mysql_error());
// select db criteria
$sql = "SELECT * FROM $db_table ORDER BY lname";
$results = @mysql_query($sql, $dbconnect) or die (mysql_error());
// create variables for db items
while ($row = mysql_fetch_array($results)) {
$last_name = $row["lname"];
$worker_class = $row["worker_class"];
if ($worker_class == "server") {
$option_server[$row] = $last_name;
$option_block_server .= "<option value='{$option_server[ 'row' ]}'>$last_name</option>" ;
}
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="generator" content="PHP Designer 2005" />
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<select>
<?php echo "$option_block_server";?>
</select>
</body>
</html>
One last asking,
to maybe see for myself (and other helpers too can see)
Can you give a link to this script
and I can run it, and see what I get.
Probably same Browser 'View source' result, as you got.
/halojoy - wants to help to solve this, but think this is a mystery
PS.
I am sure you have run phpinfo.php at your server:
<?php
// this php page is called 'phpinfo.php'
// gives all setings of my server and of php.ini
phpinfo();
?>
If you havent, tells me
you Are a real nice beginner
Welcome to the phpinfo() gang!
[man]phpinfo[/man]
[man]phpinfo[/man]
[man]phpinfo[/man]
[man]phpinfo[/man]
🙂