Hi, i have problem with my code.
In my page there are session variable;
session_start();
session_register("WFCounter"
;
session_register("TCounter"
;
session_register("EFactor"
;
Initially they are set to 0
if(!$WFCounter) $WFCounter=0;
if(!$TCounter) $TCounter=0;
if(!$EFactor) $EFactor=0;
Also, there are 3 submit buttons
<input type="submit" name="submit1" value="Update_UCCP">
<input type="submit" name="submit2" value="Update_Technical_Factor">
<input type="submit" name="submit3" value="Update_Environment_Factor">
And there is validation code that check for validity
if ($WFCounter != 0)
{
check validity for Weight Factor
}
if ($TCounter != 0)
{
check validity for Technical Factor
}
if ($EFactor != 0)
{
check validity for Environmental Factor
}
Initially this would not be checked..
However, if I press the button, let say Update_UCCP button, there is a code that check(page is reloaded into itself using $PHP_SELF) if it was checked, and increases the WFCounter
if(isset($HTTP_POST_VARS['$submit1']))
{
$WFCounter++; //increase the WFCounter
echo "hi";
}
However, this code doesn't seems to work...
is there any problem with this code?
Please help me thankyou.
In my page there are session variable;
session_start();
session_register("WFCounter"
session_register("TCounter"
session_register("EFactor"
Initially they are set to 0
if(!$WFCounter) $WFCounter=0;
if(!$TCounter) $TCounter=0;
if(!$EFactor) $EFactor=0;
Also, there are 3 submit buttons
<input type="submit" name="submit1" value="Update_UCCP">
<input type="submit" name="submit2" value="Update_Technical_Factor">
<input type="submit" name="submit3" value="Update_Environment_Factor">
And there is validation code that check for validity
if ($WFCounter != 0)
{
check validity for Weight Factor
}
if ($TCounter != 0)
{
check validity for Technical Factor
}
if ($EFactor != 0)
{
check validity for Environmental Factor
}
Initially this would not be checked..
However, if I press the button, let say Update_UCCP button, there is a code that check(page is reloaded into itself using $PHP_SELF) if it was checked, and increases the WFCounter
if(isset($HTTP_POST_VARS['$submit1']))
{
$WFCounter++; //increase the WFCounter
echo "hi";
}
However, this code doesn't seems to work...
is there any problem with this code?
Please help me thankyou.