Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-03 Thread Martín Marqués
On Dom 02 Jun 2002 21:45, David Freeman wrote: I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Personally, it depends on what I'm doing. I find that excessive use of ? And ? in my code gets

[PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Since most of my code is a mixture (the early stuff is 'mixed' html + php), I've been wondering why code in 'pure' php? Is there some compelling reason (that I'm

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Bogdan Stancescu
No *real* reason - just two not-so-important ones: 1. Clarity Please compare these two: -- MIXED td bgcolor=?php echo $td_col; ? class=?php echo $prefclass; ? ?php $fldcontent=$myrow[0]?$myrow[0]:no data; ? input type=text name=fname size=50 value=?php echo $fldcontent; ? /td -- PURE

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
Thanks Bogdan, That's what I thought, but I was beginning to feel 'guilty' the more I understood php. It seems to me, from my limited experience, that there's much mor chance for error using 'pure' php (as in forgetting ' or or closing with ; -- but . . . Actually I've found that the

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
On Sunday 02 June 2002 08:13 pm, you wrote: On Sun, Jun 02, 2002 at 07:55:09PM -0400, Andre Dubuc wrote: I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Since most of my code is a mixture (the early

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Bogdan Stancescu
I'm not sure what you mean... Is it checking that you fill in the correct values via PHP or that the submission works - or something else? Bogdan Andre Dubuc wrote: Thanks Bogdan, That's what I thought, but I was beginning to feel 'guilty' the more I understood php. It seems to me, from my

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Michael Davey
However... From the point of view of someone who has worked in a company where diesign is separated from development, it is much better to have separate files with HTML templates with special markers (in the library I use, it is HTML comments !--element_to_replace--) so that the two processes

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
That's what I meant. I was referring to verification/validation scripts for user inputs. I've made a separate page that runs these routines. I have a feeling I should have incorporated them on the user input page . . . but does it really amtter if they're on another page? Andre On Sunday 02

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Simon Troup
I would ask the question How much HTML before you break out of PHP and into HTML. My answer is any. Surely you're making the engine work just to echo stuff out? But are you asking for more by making it jump in and out between all those tags?! Short tags ... td bgcolor=?=$td_col?

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Andre Dubuc
Thanks Michael, Point well-made. I suppose doing it the mixed way might have repercussions later on if/when the site grows. Perhaps while the code is still fresh in my mid, it might be worth the effort to separate it. However, for a good part of the site, I've used CSS for appearance details,

RE: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread David Freeman
I've noticed that many people on the list code in 'pure' php, i.e. ? print input type='text' name='fname' size='50'; // etc ? Personally, it depends on what I'm doing. I find that excessive use of ? And ? in my code gets distracting so if I need a lot of php code I will usually

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Bogdan Stancescu
No, it doesn't - just go with whatever's simpler for you... and with what matches your application better - I don't think this does matter at all. Bogdan Andre Dubuc wrote: That's what I meant. I was referring to verification/validation scripts for user inputs. I've made a separate page

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Bogdan Stancescu
I fell for this some time ago - but the trick is that 1. You don't do for ($i=0; $i999; $i++) { echo Line $ibr\n; } in real life - you do stuff, call object methods, run queries, whatever, and in between those you have both html and php - and the remote machine waits for you to do all

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Michael Davey
Point well-made. I suppose doing it the mixed way might have repercussions later on if/when the site grows. Perhaps while the code is still fresh in my mid, it might be worth the effort to separate it. However, for a good part of the site, I've used CSS for appearance details, and

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Bogdan Stancescu
This whole discussion made me really curious - so you might want to check the attachments (access mixtest.php) for a very surprising result (please note mixed.php and pure.php are exactly the same size so this doesn't affect the test). Bogdan Marcelo Leitner wrote: On Mon, Jun 03, 2002 at

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Bogdan Stancescu
I was getting a typical 2.5% more for pure PHP with the original order - switching them increases the difference to about 6.5% more for pure PHP. Make sure you run it several times before drawing any conclusions, BTW. Strange... Bogdan Marcelo Leitner wrote: On Mon, Jun 03, 2002 at