You are here: Re: PHP/HTML « All PHP « IT news, forums, messages
Re: PHP/HTML

Posted by Geoff Berrow on 03/30/06 15:07

Message-ID: <442bb9b7$0$10505$ba624c82@nntp02.dk.telia.net> from Lau
Lauritzen contained the following:

><?php
> if($form_errorlist): ?>
> Please correct the following errors:<BR>
> <UL>
> <?php foreach($form_errors as $val): ?>
> <LI><?=$val?> // Here is the problem
> <?php endforeach; ?>
> </UL>
><?php endif; ?>


You have coded assuming short tags are enabled and they may not be.

You have $form_errorlist and $form_errors. Are they two separate
variables?

Also I've never used that syntax so I will substitute what I normally
use.

Try:

<?php
if($form_errorlist){ ?>
Please correct the following errors:<BR>
<UL>
<?php foreach($form_errors as $val){ ?>
<LI><?php echo $val; ?> </LI>
<?php }?>
</UL>
<?php } ?>

<?php
if($form_errorlist){
echo ' Please correct the following errors:<BR>\n<UL>';
foreach($form_errors as $val){
echo "<LI>$val</LI>";
}
echo '</UL>';
}
?>
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

 

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

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