ProgramminFool
Technical User
This code shows what I expect: a submit button which when pressed will load the same page again with the words 'Submit was pressed' only appearing.
When I try this with $hasPassed instead of hasPassed, which is the way I thought I was 'supposed' to write PHP, it doesn't work...
Suggestions?
<?php
if(hasPassed)
{
echo "Submit was pressed";
}
if(!hasPassed)
{
?>
<form method="post" action="my_test.php">
<input type="hidden" value="something" name="hasPassed">
<input type="submit" value="Submit!">
</form>
<?php
}
?>
-------------------------------------------------
“Talent is cheap, dedication is expensive. It will cost you your life.”
When I try this with $hasPassed instead of hasPassed, which is the way I thought I was 'supposed' to write PHP, it doesn't work...
Suggestions?
<?php
if(hasPassed)
{
echo "Submit was pressed";
}
if(!hasPassed)
{
?>
<form method="post" action="my_test.php">
<input type="hidden" value="something" name="hasPassed">
<input type="submit" value="Submit!">
</form>
<?php
}
?>
-------------------------------------------------
“Talent is cheap, dedication is expensive. It will cost you your life.”