Reputation: 22270
This is a newbie question...
I receive data from the user via a form, if one of the fields I get is marked 'yes' I want to send him a new form.
How is this done?
edit: I know how to check the value of my original form's variable via $_POST. I know the conditionals, I'm asking for the syntax for creating the new form or redirecting the user to another html page with the new form.
Upvotes: 0
Views: 1067
Reputation: 23774
Simply break out of the PHP block to output regular HTML:
<?php
/* Processing */
if($checked) {
?>
<form>
<!-- etc. -->
</form>
<?php
}
?>
Some people prefer the if() : /* ... */ endif;
construct here, but that's merely a syntax difference.
Upvotes: 2
Reputation: 18853
Generally you would use an if statement to check the variable, if it is what you expect you display the form. Without example code of what you have tried, it is kind of hard to answer this accurately.
Upvotes: 0