CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Help Needed with If Else statement

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 02/06/2008, 9:41 PM

I have this on a grids on validate event.

What I want it to do is look at a grade listbox selection. IF its a P make the credits field (hidden) a 5. If its an F, credit is 0.

All I get is 5, regardless of what is in the grade box.

I am proud of myself for getting this far :)


$check_value = $gradetable->grade->GetValue();
if (CCGetFromGet("type",-1)=="REG")
{
if ($check_value ='P');
{
}
$gradetable->credits->SetValue(5);
}
else
{
$gradetable->credits->SetValue(0);
}
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
datadoit
Posted: 02/07/2008, 6:16 AM

You're close! Remember, in PHP, if you're testing a condition, always
use "==". A single "=" sets a value, a double tests for the value.
wkempees
Posted: 02/07/2008, 6:18 AM

'='is assignement in PHP
use '==' for comparisons

Walter
"ckroon" <ckroon@forum.codecharge> schreef in bericht
news:547aa99f7cf392@news.codecharge.com...
>I have this on a grids on validate event.
>
> What I want it to do is look at a grade listbox selection. IF its a P make
> the
> credits field (hidden) a 5. If its an F, credit is 0.
>
> All I get is 5, regardless of what is in the grade box.
>
> I am proud of myself for getting this far :)
>
>
> $check_value = $gradetable->grade->GetValue();
> if (CCGetFromGet("type",-1)=="REG")
> {
> if ($check_value ='P');
> {
> }
> $gradetable->credits->SetValue(5);
> }
> else
> {
> $gradetable->credits->SetValue(0);
> }
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.