Я думаю, что это ваша проблема:
1) $select="(SELECT adminUserName,adminPassword FROM admin)";
2) $query=mysql_query("$select") or die(mysql_error());
3) while (mysql_fetch_array($query))
4) if ($query['adminUserName'] == $adminUserName & $query['adminPassword'] == $adminPassword)
должно быть:
1) $select="SELECT adminUserName,adminPassword FROM admin";
2) $query=mysql_query($select) or die(mysql_error());
3) while ($row = mysql_fetch_array($query))
4) if ($row['adminUserName'] == $adminUserName && $row['adminPassword'] == $adminPassword)
Итак, ваш полный код выглядит так:
<?
mysql_pconnect("localhost","root","123") or die (mysql_error());
mysql_select_db("reservebox",$connection) or die (mysql_error());
$select="SELECT adminUserName,adminPassword FROM admin";
$query=mysql_query($select) or die(mysql_error());
while ($row = mysql_fetch_array($query))
{
if ($row['adminUserName'] == $adminUserName && $row['adminPassword'] == $adminPassword)
{
echo "welcome to Admin Control Panel";
}
else
{
echo " problem with login";
}
}
?>