On Tue, 15 May 2001 10:58, Christian Dechery wrote:
> At 10:35 15/5/2001 +0930, David Robley wrote:
> >On Tue, 15 May 2001 09:40, Christian Dechery wrote:
> > > In most of my scripts there are always headers and footers to html
> > > outputs... like logos, images, and on the bottom some links and
> > > stuff like that... that should always apear...
> > >
> > > the most basic is:
> > >
> > > <html>
> > > ... header here ...
> > > <?php
> > > lots of code
> > > ?>
> > > ... footer here ...
> > > </html>
> > >
> > > but sometimes I want something like this:
> > > <?php
> > >          session_start(); // for instance
> > >          code code code
> > >          if(something)
> > >                  print error message and terminate script;
> > > ?>
> > > <html>
> > > sadasdsa
> > > </html>
> > >
> > > what do I do in this case??? I've tried all kinds of programing
> > > techniques... but none of them seems to fit here.
> >
> >exit or die are probably the tools you want.
>
> yeah... that's what I use... but then the footer isn't going to be
> displayed...

You didn't mention that :-)
 if(something)
      print footer
     print error message and terminate script;

or whatever order you wannt them in.

-- 
David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES      Flinders University, SOUTH AUSTRALIA  

   "" said Tom blankly.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to