From the file calling the function:
<?php
$round = "Round 1"; $region = "East";
include "check.php"; isAuthorized($_COOKIE['username'], $_COOKIE['password']);
include "checkEntry.php"; check4Entry($username, $round, $region);
...
From checkEntry.php:
<?php
function check4Entry($name, $reg, $rnd) {
$connection = mysql_connect("localhost", "root") or die(mysql_error());
$db = mysql_select_db("marchmadness", $connection) or die(mysql_error())
;
$checking = "SELECT * FROM pick WHERE userID = \"$uname\" AND round = \"$rnd\" AND region = \"$reg\"";
$result = mysql_query($checking, $connection) or die(mysql_error());
$numRows = mysql_num_rows($result) or die(mysql_error());
if ($numRows > 0) {
print("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"bbb.css\"></head><body><center><table class=\"outTbl\"><tr><th align=\"center\" class=\"outTh\"> Oops! There are already selections made for $uname in $reg - $rnd. </th></tr> <tr><td>$uname, if you'd like to modify your selections, please click <a href=\"modifyEntry.php\">here</a>.</td></tr></table></center></body></html>");
exit;
}
}
?>
==============
When I submit the form, I get a blank screen as a result. There aren't any errors ouput to the screen. I've compared this with another function I've created, and there doesn't appear to be anything different. The latter works.
BTW, I bet you'll never guess what this is for...;-)
Thanks for your help!
--Joel
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php