You are here: PHP script just stops for no reason « PHP Programming Language « IT news, forums, messages
PHP script just stops for no reason

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация