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. |
 |
 |
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/
>
|
|
|
 |
|