"Alex Black" ...
> >> the horse is back from the dead!
> >
> >huh?
>
> inside joke.
Doh.
> > > I don't like to do database connections when I've already output
markup,
> > > what if something goes wrong, or I want to do a redirect, etc?
> >
> > If something goes wrong -> It's the DBA fault. :-)
>> the horse is back from the dead!
>
>huh?
inside joke.
> Why? If nested tables can do the work, i won't bother learning how layers
> work...
um, I mean in your application design, not your html.
>> I don't like to do database connections when I've already output markup,
>> what if something
"Alex Black" ...
> the horse is back from the dead!
huh?
> > And aside from that, i don't have a one and only common_head.php ... i
have
> > a separate plain common head, in plain HTML... the real common_head.php
> > should look like (definitively not real PHP sintax):
>
> right, and though this
> >>
> >> what are you doing making a connection to a database on the same page you
> >> spit out the results from?
> >
As long as the password and username are on an include not available
in the http doc tree, I would assume you can use that included
function to connect as much as you want
> There are things that can be done to speed things up though...cacheing files
> at the page level, or even cacheing templated components at the sub-page
> level where possible can overcome much of the overhead of using templates.
but that doesn't do you any good on pages that are getting results
the horse is back from the dead!
I can't resist:
> From: [EMAIL PROTECTED] ("Iván Sánchez Ortega \"MR\"")
> Newsgroups: php.general
> Date: 13 Jan 2001 14:17:35 -0800
> Subject: Re: [PHP] mixing HTML and PHP code
>
> "Alex Black&qu
"Alex Black" ...
> > > connect_to_database();
> > parse_query();
> > execute_query();
> >
> > echo "";
> >
> > while (fetch_row_from_query())
> > {
> > $output = data_from_fetched_row();
> > $more_output = more_data_from_fetched_row();
> >
> > echo " $output $more_output ";
> >
> > }
> > echo ""
"Mark Maggelet" ...
> I think you missed something:
>
> while (fetch_row_from_query()){
>$output = data_from_fetched_row();
>$more_output = more_data_from_fetched_row();?>
>
>
>
>
>
>
> tell me that's not easier on your eyes :)
Yes, but i wrote that because the w
> Date: Thu, 11 Jan 2001 19:41:34 -0500 (EST)
> From: Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
>
> emacs sucks! vi forever! :P
>
> --
> Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
Hey, guy, please, be delicate, I love it, it's my wife.
vi is my brother
--
-Michael
--
PHP General Mailing
tent)) {
main_title1($title, BLUE2);
blockquote($text);
}
that's it.
. Jade Ohlhauser
[website architect]... http://bandwidthplace.com
- Original Message -
From: "Kulkarni, Vikram" <[EMAIL PROTECTED]>
To: "'Jade Ohlhauser
HAR! :)
cal
-Original Message-
From: Tim Zickus [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 6:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mixing HTML and PHP code
> that's why I didn't implement one of those keyword things in binarycloud.
> ergh.
P
> Well, even if it wouldn't be that much of a problem, it still is easier
with > templates. As you admitted, doing it with templates is cleaner, on
the HTML
> part. This can be important, if when you change layout often and have to
> work with designers.
Amen. :) Some of the HTML folks I deal wi
Alex Black wrote:
> Speaking as a not-pot-smoking mac-using only partially hippie web designer:
>
> why bother with creating your own syntax?
>
> why not just explain some _super_basic_ php syntax to the "html dude" and
> have him do the code himself?
>
> also, dreamweaver nicely ignores
Actuall
Alex Black wrote:
> >> part of the point was for _PHP_ to be embedded html, in my opinion your
> >
> > It was created that way. It still is possible. Is can be quite handy,
> > sometimes (or often, depends on what you do). That doesn't mean you have
> > to use it.
>
> I'm not implying that there a
> that's why I didn't implement one of those keyword things in binarycloud.
> ergh.
Pretty soon we're going to have to start limiting you to only mentioning
binarycloud 2 times per hour or less. :-) :-)
- Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PRO
> why bother with creating your own syntax?
> why not just explain some _super_basic_ php syntax to the "html dude" and
> have him do the code himself?
Cause we like it better that way. :) Any time you're mixing code and HTML
you're asking for trouble, IMHO. Or at least working a lot harder th
>
> {:each:output}
>
> {output}{more_output}
>
> {:next:more_output}
> {:end}
>
>
> Even a pot-smoking mac-using hippie web designer can understand that. :-)
> And it's readable in Dreamweaver or GoLive or any of those visual HTML
> tools. For Dreamweaver I added a little custom definition t
> connect_to_database();
> parse_query();
> execute_query();
>
> echo "";
>
> while (fetch_row_from_query())
> {
> $output = data_from_fetched_row();
> $more_output = more_data_from_fetched_row();
>
> echo " $output $more_output ";
>
> }
> echo "";
> ?>
Well, this may be a bit specific, but
> That I prefer to call it "investment" instead of overhead because it has
> given us a system we vastly prefer.
hehe, I like that. I still disagree, but that was good :)
>> by all means use whatever techniques you like in-house, but that would be
>> completely useless to someone in the "outside
94710-2522
> From: [EMAIL PROTECTED] (Mark Maggelet)
> Newsgroups: php.general
> Date: 12 Jan 2001 11:40:32 -0800
> Subject: Re: [PHP] mixing HTML and PHP code
>
>> http://www.binarycloud.com/code_standard.html
>
>>> http://marc.theaimsgroup.com/?l=php-pear&
>> and the problem with that, is you're not paring tons of html through a
>> search-replace function, which also created unnecessary overheead, and
>
> You have a point here. Template-systems are slow.
yeppers...
that's why I didn't implement one of those keyword things in binarycloud.
ergh.
>
In Dreamtime, we'd just have a template that looks like this:
{:each:output}
{output}{more_output}
{:next:more_output}
{:end}
Even a pot-smoking mac-using hippie web designer can understand that. :-)
And it's readable in Dreamweaver or GoLive or any of those visual HTML
tools. Fo
I think you missed something:
tell me that's not easier on your eyes :) Another nice thing about
doing it this way is you can work with a web designer who uses a
visual tool like dreamweaver.
On Fri, 12 Jan 2001 22:10:08 +0100, MR ([EMAIL PROTECTED])
wrote:
>Alex B
Alex Black ...
>
>
> is really not that much harder to write.
>
> html people can ignore it, php can find their code, and those that know both
> can reap the benefits.
>
> what about loops?
You mean that this code
";
while (fetch_row_from_query())
{
$output = data_from_fetched_row();
Christian Reiniger ...
> One reason why I don't like the "echo" route: I lose the syntax
> highlighting for the HTML that way. String constants should be
> highlighted as, well, string constants normally, but when they contain
> HTML code that's just plain ugly.
Well, that's the point about usin
> that may work for you, but it created a lot of overhead in your
> applications, and anyone that doesn't know about you special "html api"
will
> be screwed...
That I prefer to call it "investment" instead of overhead because it has
given us a system we vastly prefer.
> by all means use whateve
>http://www.binarycloud.com/code_standard.html
>> http://marc.theaimsgroup.com/?l=php-pear&m=97603413001842&w=2
>> Best Practices: PHP Coding Style :
>> http://phpbuilder.com/columns/tim20010101.php3
>> Smart Architectures in PHP :
>> http://phpbuilder.com/
Alex Black wrote:
> >
>
> and the problem with that, is you're not paring tons of html through a
> search-replace function, which also created unnecessary overheead, and
You have a point here. Template-systems are slow.
> forces you (once again) to make a spec that says "here's how this templat
> or more like :
>
>
>
>
> Name :
> $name = 'johnny';
> echo $name; ?>
>
>
> Title :
> $title = 'smith';
> echo $title; ?>
>
>
>
yes, uhhzakkly :)
>
> ---
> Yeah, there are more important things in life than money, but they won't go
> out with
> Coding standards are being created (via PEAR) and a few recent articles
> exist but point is we're teaching differently, everywhere. PHP is loose
> as a goose! print 'foo'; print("foo"); print "foo"; printf("%s","foo");
> ... all being taught, all being read, all being (mis)used.
!
http://w
> No.
>
>
>
> makes the code usable, and your HTML can even be edited with a
> graphical HTML-editor.
>
> There is no reason to mix up HTML and PHP, except for very small
> projects.
>
> regards
> Wagner
and the problem with that, is you're not paring tons of html through a
search-replace fu
that may work for you, but it created a lot of overhead in your
applications, and anyone that doesn't know about you special "html api" will
be screwed...
by all means use whatever techniques you like in-house, but that would be
completely useless to someone in the "outside world"
-alex
> (comm
On Fri, 12 Jan 2001, MR wrote:
> Philip Olson ...
> > You know what's annoying? This (yes, it happens) :
> >
> > echo ("");
> > echo ("");
> > echo ("");
> > print("Name :");
> > $name = 'johnny';
> > printf("%s %s %s","","$name","");
> > echo ("");
> > echo ("")
i used to think
Name :
","$name","");?>
Title :
","$title","");?>
or more like :
Name :
Title :
---
Yeah, there are mor
Philip Olson ...
> You know what's annoying? This (yes, it happens) :
>
> echo ("");
> echo ("");
> echo ("");
> print("Name :");
> $name = 'johnny';
> printf("%s %s %s","","$name","");
> echo ("");
> echo ("");
> print("Title :");
> $title = 'smith';
>
Alex Black ...
> yes:
>
> if you have ever worked in a fast paced production environment, where html
> is changed sometimes 5 times a day, digging through hundreds of lines of:
>
> echo ""
>
> starts to make you insane.
Well, i suggest you to write that kind of lines this way instead:
echo ""
W
On Friday 12 January 2001 00:26, [EMAIL PROTECTED] wrote:
> > echo "";
> > echo "";
> > echo "$title";
> > echo " if ($time_to_write_the_web_page) {
>
> // write the web page.
> echo "
>
>
> $title
> ";
One reason why I don'
You know what's annoying? This (yes, it happens) :
echo ("");
echo ("");
echo ("");
print("Name :");
$name = 'johnny';
printf("%s %s %s","","$name","");
echo ("");
echo ("");
print("Title :");
$title = 'smith';
printf("%s %s %s","","$title",
Alex Black wrote:
> echo " value=\"$value\">"
>
> starts to make you insane.
If it is done wrong spread over the whole project hidden between lines
of PHP-code, it sure does.
> speaking as an html author, and a lover of php, _please_:
>
>
>
> it makes the code useable.
No.
makes the code u
On Thu, 11 Jan 2001, Alex Black wrote:
> like this:
>
> echo "";
> echo "";
> echo "$title";
> echo " href='resources/css/$css.css'>";
> echo " language='javascript'>";
> echo "";
> echo "
$title
";
insert_css_js_here();
ther
staff... not only graphics...
just my 0.2c..
Cheers,
Maxim Maletsky.
-Original Message-
From: Josh G [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 12:00 PM
To: PHP User Group
Subject: Re: [PHP] mixing HTML and PHP code
- Original Message -
From: "Jade Ohl
> Absolutely. We've replaced every HTML tag we use often with
> PHP functions. We separate content, style, layout, and logic so
> using 100% PHP is the best for us.
I've done that, to a point. All form input tags have been PHP'd
so that I can change their class on the fly across the entire
site
- Original Message -
From: "Jade Ohlhauser" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 1:40 PM
Subject: Re: [PHP] mixing HTML and PHP code
> IMHO even better is:
> input_text('hello', 20, $valu
> Alex said:
> let's assume you're working on a site, where there are php coders, and
html
> people: _every_single_ html production person prefers to have code
embedded
> in html, not the reverse.
Agreed, amen, etc. :)
On our large multi-member development team projects, we've gone even
further
> You _actually_ print() or echo() everything you want to send to the
> browser?
Absolutely. We've replaced every HTML tag we use often with PHP functions.
We separate content, style, layout, and logic so using 100% PHP is the best
for us.
> if you have ever worked in a fast paced production env
> As I said to my HTML Editors:
>
> Whenever you meet in your code: DO NOT TOUCH IT...
>
> It works - Programmers and Web Designers have nothing now to do together.
>
> That is what I love the most of PHP -- you can separate PHP Core and HTML
> extremely easily.
Couldn't have said it better :
66.0074
fax+510.666.0093
Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522
> From: [EMAIL PROTECTED] (Jason Murray)
> Newsgroups: php.general
> Date: 11 Jan 2001 16:33:19 -0800
> Subject: RE: [PHP] mixing HTML and PHP code
>
>> it's valid to use si
Message-
From: Alex Black [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 10:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mixing HTML and PHP code
> code snip from phorum
>
> : ()
> :
>
> //
>
> echo "$lAuthor: $author ($host)\n";
> echo
> code snip from phorum
>
> : ()
> :
>
> //
>
> echo "$lAuthor: $author ($host)\n";
> echo "$lDate: $datestamp\n";
> ?>
well, the first example is just improperly structured code.
()
or:
echo "\n";
echo " \n";
echo " \n";
echo "$lAuthor: $author ($host) \n";
echo " \n";
ec
> emacs sucks! vi forever! :P
Yes, I think its about time for another round of What Editor
Is The Most Awesomest Best And R0xx0rz The World! :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To un
emacs sucks! vi forever! :P
--
Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
--
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]
> it's valid to use single-quotes, double-quotes, or NO quotes.
If you're going to use no quote, make damn sure you don't have any
spaces :)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsu
se-insensitive.
All the attributes defined by this specification are listed in the attribute
index.
http://www.w3.org/TR/1998/REC-html40-19980424/intro/sgmltut.html#h-3.2.1
-Original Message-
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 4:22 PM
To: [EMAIL PR
> > echo "";
>
> that isn't html anymore, though.
>
> even though IE and NS may be forgiving, isn't valid.
>
> " it is.
Er, actually ... you can use any quotes you like, you just have to be
consistent and remember to close the one you open.
> > Actually, it makes it less useable for me.
>
It works, it works in
lynx,
netscape 4.76
netscape 6
mozilla 0.7
IE 5.5
opera 5.01
amaya 4.2.1
now I havent used any mac browsers but if it works for all those I assume it
will for Mac browsers eh.
Chris Lee
Mediawaveonline.com
"Alex Black" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTE
> That's pretty ugly.
>
> echo "";
that isn't html anymore, though.
even though IE and NS may be forgiving, That's a bit better.
> This is even better still:
>
> echo "";
>
> Now, I can see the PHP variable used in there a lot easier than I
> could before. Syntax highlighting would bring it
I have to agree with Jason on this one too. I work in a *production*
enviroment, Ive worked on small (2k loc) to medium (45k loc) sites and I see
no problem with echo "" accually I see a larger problem with going in and
out of PHP, it breaks the consistancy.
code snip from phorum
: ()
:
//-
> if you have ever worked in a fast paced production environment, where
> html is changed sometimes 5 times a day, digging through hundreds
> of lines of:
>
> echo " value=\"$value\">"
>
> starts to make you insane.
That's pretty ugly.
echo "";
That's a bit better.
This is even better stil
94710-2522
> From: [EMAIL PROTECTED]
> Newsgroups: php.general
> Date: 11 Jan 2001 12:40:18 -0800
> Subject: Re: [PHP] mixing HTML and PHP code
>
> On Wed, 10 Jan 2001, Alex Black wrote:
>>
>> definitely avoid print() and echo like the _plague_ for html output.
>>
On Wed, 10 Jan 2001, Alex Black wrote:
>
> definitely avoid print() and echo like the _plague_ for html output.
>
Do you have any reason for saying that other than that you don't like that
style of code?
-burk
--
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsu
o.com
vox+510.666.0074
fax+510.666.0093
Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522
> From: [EMAIL PROTECTED] ("MR")
> Newsgroups: php.general
> Date: 10 Jan 2001 15:46:51 -0800
> Subject: RE: [PHP] mixing HTML and PHP code
>
> Brian Clark
Brian Clark ...
>
> Hello Alexander,
>
> (AW == "Alexander Wagner") [EMAIL PROTECTED] writes:
>
> >> Mmmmfff... ultraedit's wordlist file still lacks the color of
> >> allaire's homesite - it does detect which parts of the .php file
> >> are HTML and what parts of the file are PHP code, and co
62 matches
Mail list logo