Re: [PHP] need better solution...

2001-05-14 Thread David Robley
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

Re: [PHP] need better solution...

2001-05-14 Thread Jason Brooke
> 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

Re: [PHP] need better solution...

2001-05-14 Thread Christian Dechery
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

Re: [PHP] need better solution...

2001-05-14 Thread Christian Dechery
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

Re: [PHP] need better solution...

2001-05-14 Thread David Robley
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

Re: [PHP] need better solution...

2001-05-14 Thread Jason Brooke
> 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

RE: [PHP] need better solution...

2001-05-14 Thread James Atkinson
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 solut

Re: [PHP] need better solution...

2001-05-14 Thread CC Zona
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) >

[PHP] need better solution...

2001-05-14 Thread Christian Dechery
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 ... ... footer here ... but sometimes I want something like this: sadasdsa

RE: [PHP] need better solution

2001-02-15 Thread Maxim Maletsky
] 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

RE: [PHP] need better solution

2001-02-15 Thread Maxim Maletsky
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 solutio

Re: [PHP] need better solution

2001-02-15 Thread Christian Reiniger
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

Re: [PHP] need better solution

2001-02-14 Thread Christian Dechery
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

Re: [PHP] need better solution

2001-02-14 Thread Christian Reiniger
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

Re: [PHP] need better solution

2001-02-14 Thread Christian Dechery
>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

Re: [PHP] need better solution

2001-02-14 Thread Michael Kimsal
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

Re: [PHP] need better solution

2001-02-14 Thread Chris Lee
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";

[PHP] need better solution

2001-02-14 Thread Christian Dechery
I need a better solution for reporting SQL errors. I'm used to work with ASP, and whenever a query has a syntax error, it stops the script and reports the error as if it was a compile error. This is very usefull, but int PHP it doesn't work like that, I know. I came with a function query_error()