Reply to RE: [PHP] do this OR that

Your name:

Reply:


Posted by Jim Moseby on 10/21/71 11:33

>
> Group,
>
> I have a function that grades a quiz. I want to show a page if the
> student scores 80% or above.
>
> Currently, the script reads:
>
> <snippet>
> $total = ($mygrade/$quiz->grade) ;
> if ($total > .80) {
> </snippet>
>
> That means that if you score 80% precisely, you don't get the
> follow-up
> script.
>
> I believe I should re-write it like this:
>
> <snippet>
> $total = ($mygrade/$quiz->grade) ;
> if ($total > .80 | .80) {
> </snippet>
>
> Is that right? Thanks in advance for your help.
>

How about this:

<snippet>
$total = ($mygrade/$quiz->grade) ;
if ($total >= .80) {
</snippet>


or this:

<snippet>
$total = ($mygrade/$quiz->grade) ;
if ($total > .79) {
</snippet>

JM

[Back to original 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

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