Username & Password ?



Where and how do I incorporate username and password in this code?

<html>
<body>
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM employees",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1>\n";
echo "<tr><td>Name</td><td>Position</td></tr>\n";
do {
printf("<tr><td>%s %s</td><td>%s</tr>\n", $myrow["first"], $myrow["last"],
$myrow["address"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
?>
</body>
</html>

--

Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets

.



Relevant Pages

  • Re: Mangled Code Mess
    ... Double Echo wrote: ... had a lot of work interrupting my newsgroup time. ... Anyway, embedded PHP programs were the rave a couple of years ago, and people were doing ... PHP in HTML docs and will barf or ignore it if you attempt it. ...
    (comp.lang.php)
  • Re: Why is content of $name empty?
    ... echo "You need at least two characters in the Name field"; ... // Convert HTML characters to entity ... // Example taken from PHP Manual ...
    (alt.php)
  • Re: Trying to change global array value with $POST
    ... echo "Number? ... You then write out an undefined ending value. ...
    (comp.lang.php)
  • Re: Why is content of $name empty?
    ... echo "You need at least two characters in the Name field"; ... // Convert HTML characters to entity ... // Example taken from PHP Manual ...
    (alt.php)
  • Re: using echo but need something to execute php code
    ... pass that file onto the user by using echo. ... If you have an html file, that is, a file containing html markup with "html" ... as html by the php engine. ... //Losts of parsing code here ...
    (comp.lang.php)