Re: [PHP] mixing HTML and PHP code

2001-01-16 Thread Iván Sánchez Ortega \"MR\"
"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. :-)

Re: [PHP] mixing HTML and PHP code

2001-01-15 Thread Alex Black
>> 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

Re: [PHP] mixing HTML and PHP code

2001-01-15 Thread Iván Sánchez Ortega \"MR\"
"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

Re: [PHP] mixing HTML and PHP code

2001-01-14 Thread Kristofer Widholm
> >> > >> 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

Re: [PHP] mixing HTML and PHP code

2001-01-14 Thread Alex Black
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-14 Thread Alex Black
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

Re: [PHP] mixing HTML and PHP code

2001-01-13 Thread Iván Sánchez Ortega \"MR\"
"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 ""

Re: [PHP] mixing HTML and PHP code

2001-01-13 Thread Iván Sánchez Ortega \"MR\"
"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

Re: [PHP] mixing HTML and PHP code

2001-01-13 Thread Michael Govorun
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Jade Ohlhauser
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

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread Cal Evans
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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Tim Zickus
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alexander Wagner
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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alexander Wagner
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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Tim Zickus
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Tim Zickus
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
> > {: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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread 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 ""; > ?> Well, this may be a bit specific, but

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
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&

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
>> 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. >

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Tim Zickus
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

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread Mark Maggelet
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

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread MR
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();

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread MR
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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Jade Ohlhauser
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Mark Maggelet
>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/

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alexander Wagner
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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Alex Black
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

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread Antonio S. Martins Jr.
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 ("")

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Hrishi
i used to think Name : ","$name","");?> Title : ","$title","");?> or more like : Name : Title : --- Yeah, there are mor

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread MR
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'; >

RE: [PHP] mixing HTML and PHP code

2001-01-12 Thread MR
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

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread Christian Reiniger
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'

Re: [PHP] mixing HTML and PHP code

2001-01-12 Thread 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'; printf("%s %s %s","","$title",

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Alexander Wagner
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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread burk
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();

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Maxim Maletsky
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

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Josh G
- 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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Tim Zickus
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jade Ohlhauser
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Alex Black
> 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 :

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Alex Black
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

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Maxim Maletsky
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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Alex Black
> 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

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> 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

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Ignacio Vazquez-Abrams
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]

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> 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

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread DanO
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

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> > 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. >

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Chris Lee
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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Alex Black
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Chris Lee
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 : () : //-

RE: [PHP] mixing HTML and PHP code

2001-01-11 Thread Jason Murray
> 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

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread Alex Black
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. >>

Re: [PHP] mixing HTML and PHP code

2001-01-11 Thread burk
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

Re: [PHP] mixing HTML and PHP code

2001-01-10 Thread Alex Black
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

RE: [PHP] mixing HTML and PHP code

2001-01-10 Thread MR
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