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
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Christian Dechery) wrote:
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)
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 of my
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
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
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
At 11:02 15/5/2001 +1000, Jason Brooke wrote:
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
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
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 ()
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
] 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_dbbr\n";
echo "Error:
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_dbbr\n";
echo "Error: " . mysql_errno() . ':' . mysql_error() . "br\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_dbbr\n";
echo "Error: " . mysql_errno() . ':' . mysql_error() . "br\n";
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.
15 matches
Mail list logo