Does xhtml recognize php? Is xhtml the best to use currently?
this code prints everything after my greater than sign.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Western Botanicals - Add Product Type</title>
</head>
<body>
<h1>Add Product Type</h1>
<?php
// include the database connections
include("/includes/dbconnect.php");
// add product type if not found
if (isset($_GET['producttypename'])) {
$producttypename = ($_GET['producttypename']);
$sql = "SELECT * FROM Product_Types WHERE Product_Type_Name =
('$producttypename')";
$result = @mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$producttypenamefound = $row['Product_Type_ID'];
}
if ($producttypenamefound > 0) {
echo ('Product Type not entered. Already
found.');
} else {
$sql = "INSERT INTO Product_Types VALUES
('i','$producttypename')";
$result = @mysql_query($sql);
echo ('Product Type ' . $producttypename . '
added');
}
}
echo ('<form method="get" action="'.$_SERVER['PHP_SELF'].'">');
echo ('Product Type Name: <input type="text" name="producttypename"
value="" /><br />');
echo ('<br /><input type="submit" value="Add" />');
echo ('</form>');
$sql = "SELECT * FROM Product_Types";
$result = @mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
echo($row['Product_Type_Name'] . '<br />')
}
?>
</body>
</html>
Justin Giboney
Graphic Design
Western Botanicals
Ph:800.651.4372, Fax:866.366.4372
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net