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
> the problem is, if I terminate the script on that condition the footer
> won't be displayed...
Instant fix - include "footer.inc"; exit;
Better fix: decide your logical layout before you proceed and arrange if/else
blocks accordingly so you don't need to terminate the script to avoid showing a
At 11:02 15/5/2001 +1000, Jason Brooke wrote:
> > but sometimes I want something like this:
> > > session_start(); // for instance
> > code code code
> > if(something)
> > print error message and terminate script;
> > ?>
> >
> > sadasdsa
> >
> >
> > w
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...
> >
> > t
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:
>
>
> ... header here ...
> lots of c
> but sometimes I want something like this:
> session_start(); // for instance
> code code code
> if(something)
> print error message and terminate script;
> ?>
>
> sadasdsa
>
>
> what do I do in this case??? I've tried all kinds of programing
> techn
I would suggest some sort of Templating solution. Take a look at Smarty,
PHPLib, or FastTemplates.
- James
> -Original Message-
> From: Christian Dechery [mailto:[EMAIL PROTECTED]]
> Sent: May 14, 2001 5:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] need better solution...
>
>
> In most
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Christian Dechery) wrote:
>
> ... header here ...
> lots of code
> ?>
> ... footer here ...
>
>
> but sometimes I want something like this:
> session_start(); // for instance
> code code code
> if(something)
>
] need better solution
works for me, just call it. change it to better match yours if you like.
function check_db($query = 'Unavailble')
{
global $store_db;
if ( mysql_errno() )
{
echo "Error: Problem with DataBase : $store_db\n";
echo &qu
use
mysql_query($. , ) or die(mysql_error() . ' oopps.. big time
')
Cheers,
Maxim Maletsky
-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 12:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] need better solution
I need a
On Thursday 15 February 2001 02:49, Christian Dechery wrote:
> > > that's kinda what I have here... but the line of code isn't being
> > > shown... and that is the problem... I for one, think that in an
> > > error message the line of code is crucial.
> >
> >Check the manual for set_error_handler
At 19:53 14/2/2001 +0100, Christian Reiniger wrote:
>On Wednesday 14 February 2001 18:43, Christian Dechery wrote:
> > that's kinda what I have here... but the line of code isn't being
> > shown... and that is the problem... I for one, think that in an error
> > message the line of code is crucial
On Wednesday 14 February 2001 18:43, Christian Dechery wrote:
> that's kinda what I have here... but the line of code isn't being
> shown... and that is the problem... I for one, think that in an error
> message the line of code is crucial.
Check the manual for set_error_handler ()
--
Christian
>works for me, just call it. change it to better match yours if you like.
>
> function check_db($query = 'Unavailble')
> {
> global $store_db;
> if ( mysql_errno() )
>{
> echo "Error: Problem with DataBase : $store_db\n";
> echo "Error: " . mysql_errno() . ':' . mysql_error() . "\n
What version of PHP are you using? If there's a syntax error in our
statements, it stops execution, just like ASP.
There are error_reporting levels you can play with, and have errors trigger
certain functions to handle the errors gracefully.
Christian Dechery wrote:
> I need a better solution
works for me, just call it. change it to better match yours if you like.
function check_db($query = 'Unavailble')
{
global $store_db;
if ( mysql_errno() )
{
echo "Error: Problem with DataBase : $store_db\n";
echo "Error: " . mysql_errno() . ':' . mysql_error() . "\n";
16 matches
Mail list logo