I'm completely frustrated. At first, I thought it was a problem with the host. Now that I've switched, it still does the same thing. I have a page requiring Protected Directories. It requires the user to enter their username and password 3 TIMES! even though it was correct the first time. Here is the code - does anyone see why it's popping up that AUTH box 3 times? I'm using the standard $PHP_AUTH_USER as the variable when they log in from that AUTH box.
Thanks!!
<html>
<head>
<title>Brian Weems Media Access</title>
</head>
<body bgcolor="#c0c0c0">
<script language="JavaScript">
function del()
{
if (confirm("DELETE: Are you sure?"));
{location = "index.php?action=delete"}
}
</script>
<center>
<table width=700 cellspacing=0 cellpadding=0 border=0>
<tr>
<td align=middle valign=bottom bgcolor="#B62525">
<IMG SRC="logo.gif" BORDER=0>
</td>
</tr>
<tr>
<td>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID=Movie1 WIDTH=700 HEIGHT=75>
<PARAM NAME=movie VALUE="Movie2.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="Movie2.swf" quality=high bgcolor=#FFFFFF WIDTH=700 HEIGHT=75 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</td>
</tr>
<tr height="500">
<td bgcolor="white" valign="top">
<table cellpadding="5" cellspacing="5" border="0">
<tr>
<td>
<?
// DELETE AUDIO FILE
if ($action == "delete")
{
$db = mysql_connect("localhost","username","password");
mysql_select_db("provoice_provoice",$db);
$sql = mysql_query("DELETE FROM audio WHERE id = '$id'",$db);
$sql;
echo"<META HTTP-EQUIV=\"refresh\" content=\"0;URL=index.php\">";
}
// DISPLAY AUDIO FILES
$db = mysql_connect("localhost","username","password");
mysql_select_db("provoice_provoice",$db);
$result = mysql_query("SELECT * FROM audio WHERE company = '$PHP_AUTH_USER' ORDER BY dte DESC",$db);
$number = 0;
echo"<table><tr height=\"50\"><td colspan=\"6\" valign=top>To play audio file, click the description.<br> To save to hard drive, right click on description and select <b>Save Target As</b></td></tr>
<tr><td><b>Description</b></td><td><b>Length</b></td><td colspan=\"2\"><b>Date Posted</b></td></tr>";
while ($myrow = mysql_fetch_row($result))
{
printf("<tr><td width=250>»<a href=\"files/%s\">%s</a></td> <td width=150>:%s</td> <td width=150>%s</td><td width=150></td></tr>",
$myrow[4], $myrow[2], $myrow[3], $myrow[5], $myrow[0]);
}
echo"</table>";
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>