Re: [PHP-DB] what the heck? (elementary question)
One large PHP block is more efficient than multiple small blocks of php. It's a tradeoff of "multiple invocations of the parser" versus having the parse run through (and ignore) normal text. We have run tests inhouse that validate the performance difference is fairly small, but it does exist. This was about two years ago, though, so perhaps the engine is now a one-time invocation and my test is invalid. -Mike - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 8:00 PM Subject: Re: [PHP-DB] what the heck? (elementary question) > Keep with Christophers original statement. > > It is more efficient to not have large echo values. > > gl -- Seth > > [EMAIL PROTECTED] wrote: > > > - Original Message - > > From: "Cosby, Christopher" <[EMAIL PROTECTED]> > > > >>I don't want to start a tangent here, but the most accepted way for > >>generating HTML with PHP is to NOT generate HTML with PHP. Thus, the > >>original code should be written like this: > >> > > > > Huh? ".. most accepted way for generating ...is NOT generate.."? > > Brain fart? =) > > > > I will regularly use large "echo" style statements to generate HTML, especially > > tags and result tables. > > > > > >>As far as the POST/GET question, you technically can use POST and GET > >>methods simultaneously, but it's nasty. For best results, stay away from > >>the register_globals functionality and use $HTTP_POST_VARS[] and > >>$HTTP_GET_VARS[] instead. > >> > > > > Both of which are deprecated. =( _GET _POST are the new ones. > > > > POST will allow larger form submits as well, like file uploads. GET are for > > smaller and faster data sets. > > > > > >>Go to WeSellBooksByTheMillions and buy a good PHP book for reference. They > >>have lots of basics like this in them. I prefer most anything from Wrox > >>Press (http://www.wrox.com/) > >> > > > > www.php.net > > www.phpbuilder.com > > > > RIP Computer Literacy bookstores after the Barnes and Noble acquisition. > > > > -Mike > > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] what the heck? (elementary question)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 7:47 PM To: Cosby, Christopher; [EMAIL PROTECTED] Subject: Re: [PHP-DB] what the heck? (elementary question) > I will regularly use large "echo" style statements to generate HTML, especially tags and result tables. Oops...I forgot some key phraseology here. IN MY OPINION, it's cleaner and easier to read if you don't use "echo" style statements to generate HTML, especially if it's tags where you have to do \"\"\"\" everywhere. It's just annoying (again, IMHO *8-]) to have to escape quotes and such (additionally, if you use an editor that does syntax highlighting, it looks purtier). >> As far as the POST/GET question, you technically can use POST and GET >> methods simultaneously, but it's nasty. For best results, stay away >> from the register_globals functionality and use $HTTP_POST_VARS[] and >> $HTTP_GET_VARS[] instead. > Both of which are deprecated. =( _GET _POST are the new ones. Good to know. Hard to break old habits. Thanks for the additional info. chris - - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
Re: [PHP-DB] what the heck? (elementary question)
>>POST will allow larger form submits as well, like file uploads. GET are for smaller and faster data sets. -Mike<< Not only that, but POST results cannot be properly bookmarked by the user, whereas GET results contain the full URI string, therefore can be bookmarked. Good for searches, etc. Martin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] what the heck? (elementary question)
Keep with Christophers original statement. It is more efficient to not have large echo values. gl -- Seth [EMAIL PROTECTED] wrote: > - Original Message - > From: "Cosby, Christopher" <[EMAIL PROTECTED]> > >>I don't want to start a tangent here, but the most accepted way for >>generating HTML with PHP is to NOT generate HTML with PHP. Thus, the >>original code should be written like this: >> > > Huh? ".. most accepted way for generating ...is NOT generate.."? > Brain fart? =) > > I will regularly use large "echo" style statements to generate HTML, especially > tags and result tables. > > >>As far as the POST/GET question, you technically can use POST and GET >>methods simultaneously, but it's nasty. For best results, stay away from >>the register_globals functionality and use $HTTP_POST_VARS[] and >>$HTTP_GET_VARS[] instead. >> > > Both of which are deprecated. =( _GET _POST are the new ones. > > POST will allow larger form submits as well, like file uploads. GET are for > smaller and faster data sets. > > >>Go to WeSellBooksByTheMillions and buy a good PHP book for reference. They >>have lots of basics like this in them. I prefer most anything from Wrox >>Press (http://www.wrox.com/) >> > > www.php.net > www.phpbuilder.com > > RIP Computer Literacy bookstores after the Barnes and Noble acquisition. > > -Mike > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] what the heck? (elementary question)
- Original Message - From: "Cosby, Christopher" <[EMAIL PROTECTED]> > I don't want to start a tangent here, but the most accepted way for > generating HTML with PHP is to NOT generate HTML with PHP. Thus, the > original code should be written like this: Huh? ".. most accepted way for generating ...is NOT generate.."? Brain fart? =) I will regularly use large "echo" style statements to generate HTML, especially tags and result tables. > As far as the POST/GET question, you technically can use POST and GET > methods simultaneously, but it's nasty. For best results, stay away from > the register_globals functionality and use $HTTP_POST_VARS[] and > $HTTP_GET_VARS[] instead. Both of which are deprecated. =( _GET _POST are the new ones. POST will allow larger form submits as well, like file uploads. GET are for smaller and faster data sets. > Go to WeSellBooksByTheMillions and buy a good PHP book for reference. They > have lots of basics like this in them. I prefer most anything from Wrox > Press (http://www.wrox.com/) www.php.net www.phpbuilder.com RIP Computer Literacy bookstores after the Barnes and Noble acquisition. -Mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] what the heck? (elementary question)
I don't want to start a tangent here, but the most accepted way for generating HTML with PHP is to NOT generate HTML with PHP. Thus, the original code should be written like this: :: BEGIN input.html :: :: END input.html :: :: BEGIN name.php :: You searched for and something happened. :: END name.php :: As far as the POST/GET question, you technically can use POST and GET methods simultaneously, but it's nasty. For best results, stay away from the register_globals functionality and use $HTTP_POST_VARS[] and $HTTP_GET_VARS[] instead. Last thing: Go to WeSellBooksByTheMillions and buy a good PHP book for reference. They have lots of basics like this in them. I prefer most anything from Wrox Press (http://www.wrox.com/) chris - - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
Re: [PHP-DB] what the heck? (elementary question)
You can't have extensions to a filename from the action attribute, period. You have to either use defined input fields, or hidden fields to pass value from one page to another. And just as FYI, you don't need to use the printf() function in your situation, as it's best used when you need strict formatting for output, as in the case of using currency amounts, or other situations where decimal places are needed. The easier way to write it would be simply: echo ""; echo ""; HTH Martin >>> Steve Cayford <[EMAIL PROTECTED]> 06/24/02 04:11PM >>> On Monday, June 24, 2002, at 01:52 PM, Matthew Crouch wrote: > this bit from my index page is giving me 2 headaches: > 1. it isn't passing anything into the URL > 2. the page that gets called ("name.php") sits and tries to load > forever. it looks like it's even filling up my hard drive with data (?!) > > Note: it does this (#2) even if I type in the URL with a variable and > value, like "name.php?lastname=smith" > > printf ("", > $lastname); > ?> > > > > > > > Can you do a "get" and a "post" at the same time? Tacking the lastname onto the url as in "action=\"name.php?lastname=%s\"" is using a get method, but your form is supposed to set lastname using the post method. Is there some reason you want your script to set one version of lastname and let the user type in a different version of lastname? If so try using the post method with an . -Steve > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] what the heck? (elementary question)
On Monday, June 24, 2002, at 01:52 PM, Matthew Crouch wrote: > this bit from my index page is giving me 2 headaches: > 1. it isn't passing anything into the URL > 2. the page that gets called ("name.php") sits and tries to load > forever. it looks like it's even filling up my hard drive with data (?!) > > Note: it does this (#2) even if I type in the URL with a variable and > value, like "name.php?lastname=smith" > > printf ("", > $lastname); > ?> > > > > > > > Can you do a "get" and a "post" at the same time? Tacking the lastname onto the url as in "action=\"name.php?lastname=%s\"" is using a get method, but your form is supposed to set lastname using the post method. Is there some reason you want your script to set one version of lastname and let the user type in a different version of lastname? If so try using the post method with an . -Steve > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] what the heck? (elementary question)
this bit from my index page is giving me 2 headaches: 1. it isn't passing anything into the URL 2. the page that gets called ("name.php") sits and tries to load forever. it looks like it's even filling up my hard drive with data (?!) Note: it does this (#2) even if I type in the URL with a variable and value, like "name.php?lastname=smith" ", $lastname); ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php