|
Posted by Luis Carlos on 08/30/07 07:09
Hi 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:
<html>
<head></head>
<body>
<?php
echo "<H1>START...</H1>";
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 "<H1>END...</H1>";
?>
</body>
</html>
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:
<html>
<head></head>
<body>
<H1>START...</H1>
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.
[Back to original message]
|