PHP script just stops for no reason
am 30.08.2007 09:09:15 von Luis CarlosHi everybody.
Even if I'm not a professional, I've been coding PHP for some years
now. However, I can not "see" any error in this very simple script and
it does not continues executing after the 'while'.
My script is:
echo "
START...
";require_once 'variables.php'; /* All the variables*/
require_once '.htinfo.php'; /* db info */
$sql = "SELECT * FROM $table_name ORDER BY 'uid'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($row = mysql_fetch_assoc($result) OR die(mysql_error())) {
foreach($row as $key => $value) {
if ($key != 'uid' && $key != 'nombre') {
$estadisticas[$key][$value]++ ;
} /* closes if */
} /* closes foreach*/
} /*closes while*/
echo "
END...
";?>
I know the array $estadisticas is being updated ok, but, nothing I
place after the while is closed is executed.
To make things even simpler, I just wanted the script to print "END",
and nothing happens.
If I look at the code of the generate page, I get:
START...
So, not even the remaining html tags are written in the displayed
page.
Any help will be appreciated, I can not just see anything wrong in
this trivial script.
I tested the script on Mandriva Linux and in Windows XP (xampp), same
results.