render or redirect; what's the difference
OK, so I can gather from what I have read that 'render' basically prints something and redirect sends you to another location, but are there any other differences?
Does 'render' stop the execution of a method it is within or does it continue to run after the render has been called?
I have a form that i want to validate and retain the values if it fails, would render be the best choice? What happens to the rest of the checks in the same function?
ex;
function checkSubmittedVals()
{
if ($a != $b)
{ $this->render('form'); }
echo 'hello!';
if ($form->isValid())
{ echo 'processing'; }
}
If the $a != $b fails, does 'hello!' get printed?
|