Posted by hihibibihi on 12/20/06 21:22
Toby Inkster schreef:
> hihibibihi wrote:
>
> > <?php
> > $foo="NO";
> > $text=<<<EO
> > The variable is named: $foo
> > EO;
> >
> > if (TRUE)
> > {
> > $foo="YES";
> > die($text); //how to get $foo="YES" into $text?
> > }
> > ?>
>
> As Janwillem said, you're doing things the wrong way around. What I think
> you're actually asking for is a way to specify the format of the error
> message at the top of the code instead of way down the bottom when the
> error actually happens. Here, sprintf() is your friend...
Janwillem and Toby,
Thanks for your quick reply
But i dont think i made clear enough what i was aiming at (sorry about
that): i wrote a webform (html code stored in $text), if user hits
submit-button without filling in required formfields, form should
reappear with warning -message added (stored in $foo)
Any further ideas?
gr Jan
[Back to original message]
|