RE: [PHP] html formatting in mysql post
thanks for your responses, so i understand that this code is using an array, however i havn't really used arrays as i am a novice php coder. Should this code be used on the php code for inserting the data into the MySQL table or is it used when retrieving the data using the select function? ?php // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? your help is appreciated. From: danbr...@php.net Date: Fri, 6 May 2011 23:04:44 -0400 To: hansen.r...@live.com.au CC: php-general@lists.php.net Subject: Re: [PHP] html formatting in mysql post On Fri, May 6, 2011 at 22:52, Ross Hansen wrote: Hey Guys, I am using a form to post information to a MySQL table which is then echo(ing) back out to a web page. it will sort of be like facebook where you can post messages and stuff on peoples walls. The only issue is at the moment i can get the formatting to stay. When i echo the table out from mysql it all gets displayed on one line rather than seeing my new lines which i typed in the text box. I do know that this is a HTML error as it was never given the format tags when the content was posted in the table. I have seen something about NL2BR and also something about strip slashes but i am not sure how to incorporate them into my post. Could someone please advise? Well, let's start with an easy question: have you *tried* them? // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? Error-handling and the remainder of checking is up to you. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html formatting in mysql post
On Sat, 2011-05-07 at 16:01 +0800, Ross Hansen wrote: thanks for your responses, so i understand that this code is using an array, however i havn't really used arrays as i am a novice php coder. Should this code be used on the php code for inserting the data into the MySQL table or is it used when retrieving the data using the select function? ?php // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? your help is appreciated. From: danbr...@php.net Date: Fri, 6 May 2011 23:04:44 -0400 To: hansen.r...@live.com.au CC: php-general@lists.php.net Subject: Re: [PHP] html formatting in mysql post On Fri, May 6, 2011 at 22:52, Ross Hansen wrote: Hey Guys, I am using a form to post information to a MySQL table which is then echo(ing) back out to a web page. it will sort of be like facebook where you can post messages and stuff on peoples walls. The only issue is at the moment i can get the formatting to stay. When i echo the table out from mysql it all gets displayed on one line rather than seeing my new lines which i typed in the text box. I do know that this is a HTML error as it was never given the format tags when the content was posted in the table. I have seen something about NL2BR and also something about strip slashes but i am not sure how to incorporate them into my post. Could someone please advise? Well, let's start with an easy question: have you *tried* them? // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? Error-handling and the remainder of checking is up to you. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I think it would be well worth getting a book out on PHP or reading through the various online tutorials and the PHP manual. It will explain basic things like connecting to the database, using functions, echoing content to the screen, etc. -- Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] html formatting in mysql post
After doing further reading on google i have managed to get this working using the nl2br php command. if anyone else wants to know how i did this. almost the same as what was mentioned in this thread however my rows were being displayed using while command. echo nl2br($row['colname']); Thanks again for your assistance. From: a...@ashleysheridan.co.uk To: hansen.r...@live.com.au CC: php-general@lists.php.net Date: Sat, 7 May 2011 10:32:11 +0100 Subject: RE: [PHP] html formatting in mysql post On Sat, 2011-05-07 at 16:01 +0800, Ross Hansen wrote: thanks for your responses, so i understand that this code is using an array, however i havn't really used arrays as i am a novice php coder. Should this code be used on the php code for inserting the data into the MySQL table or is it used when retrieving the data using the select function? // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? your help is appreciated. From: danbr...@php.net Date: Fri, 6 May 2011 23:04:44 -0400 To: hansen.r...@live.com.au CC: php-general@lists.php.net Subject: Re: [PHP] html formatting in mysql post On Fri, May 6, 2011 at 22:52, Ross Hansen wrote: Hey Guys, I am using a form to post information to a MySQL table which is then echo(ing) back out to a web page. it will sort of be like facebook where you can post messages and stuff on peoples walls. The only issue is at the moment i can get the formatting to stay. When i echo the table out from mysql it all gets displayed on one line rather than seeing my new lines which i typed in the text box. I do know that this is a HTML error as it was never given the format tags when the content was posted in the table. I have seen something about NL2BR and also something about strip slashes but i am not sure how to incorporate them into my post. Could someone please advise? Well, let's start with an easy question: have you *tried* them? // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? Error-handling and the remainder of checking is up to you. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I think it would be well worth getting a book out on PHP or reading through the various online tutorials and the PHP manual. It will explain basic things like connecting to the database, using functions, echoing content to the screen, etc. -- Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html formatting in mysql post
Hey Guys, I am using a form to post information to a MySQL table which is then echo(ing) back out to a web page. it will sort of be like facebook where you can post messages and stuff on peoples walls. The only issue is at the moment i can get the formatting to stay. When i echo the table out from mysql it all gets displayed on one line rather than seeing my new lines which i typed in the text box. I do know that this is a HTML error as it was never given the format tags when the content was posted in the table. I have seen something about NL2BR and also something about strip slashes but i am not sure how to incorporate them into my post. Could someone please advise?
Re: [PHP] html formatting in mysql post
On Fri, May 6, 2011 at 22:52, Ross Hansen hansen.r...@live.com.au wrote: Hey Guys, I am using a form to post information to a MySQL table which is then echo(ing) back out to a web page. it will sort of be like facebook where you can post messages and stuff on peoples walls. The only issue is at the moment i can get the formatting to stay. When i echo the table out from mysql it all gets displayed on one line rather than seeing my new lines which i typed in the text box. I do know that this is a HTML error as it was never given the format tags when the content was posted in the table. I have seen something about NL2BR and also something about strip slashes but i am not sure how to incorporate them into my post. Could someone please advise? Well, let's start with an easy question: have you *tried* them? ?php // $row = /* Database row grabbed elsewhere in your code. */''; if (is_array($row)) { foreach ($row as $r) { echo nl2br($row).PHP_EOL; } } else { echo nl2br($row).PHP_EOL; } ? Error-handling and the remainder of checking is up to you. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On 12/01/11 14:13, Richard Quadling wrote: On 12 January 2011 14:07, Steve Staplessstap...@mnsi.net wrote: On Wed, 2011-01-12 at 13:40 +, Richard Quadling wrote: On 12 January 2011 13:20, Steve Staplessstap...@mnsi.net wrote: Jim, Not to be a smart ass like Danial was (which was brilliantly written though), but you have your example formatted incorrectly. You are using commas instead of periods for concatenation, and it would have thrown an error trying to run your example. :) # corrected: echo lia href=\index.php?page={$category}\{$replace}/a/li; Steve Staples. Steve, The commas are not concatenation. They are separators for the echo construct. I don't know the internals well enough, but ... echo $a.$b.$c; vs echo $a, $b, $c; On the surface, the first instance has to create a temporary variable holding the results of the concatenation before passing it to the echo construct. In the second one, the string representations of each variable are added to the output buffer in order with no need to create a temp var first. So, I think for large strings, using commas should be more efficient. Richard. Well... I have been learned. I had no idea about doing it that way, I apologize to you, Jim. I guess my PHP-fu is not as strong as I had thought? Thank you Richard for pointing out this to me, I may end up using this method from now on. I have just always concatenated everything as a force of habit. Steve Staples. I was never taught by nuns. Eh? Oh I get it... (ugh!) Surely PHP-fu is taught by monks? -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On Tuesday, January 11, 2011 11:48:33 pm Daniel Brown wrote: On Tue, Jan 11, 2011 at 22:35, David McGlone da...@dmcentral.net wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters This is because you misspelled $categorys, where it should actually be $categories. Goes to show ya, even Deaf people aren't perfect spellers. Still like your little joke? ;-) -- Blessings David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On Tue, 2011-01-11 at 23:38 -0800, Jim Lucas wrote: On 1/11/2011 7:35 PM, David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; Try this instead echo 'lia href=index.php?page=',$category,'',$replace,'/a/li'; Jim Lucas [snip] Jim, Not to be a smart ass like Danial was (which was brilliantly written though), but you have your example formatted incorrectly. You are using commas instead of periods for concatenation, and it would have thrown an error trying to run your example. :) # corrected: echo lia href=\index.php?page={$category}\{$replace}/a/li; Steve Staples. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On 12 January 2011 13:20, Steve Staples sstap...@mnsi.net wrote: Jim, Not to be a smart ass like Danial was (which was brilliantly written though), but you have your example formatted incorrectly. You are using commas instead of periods for concatenation, and it would have thrown an error trying to run your example. :) # corrected: echo lia href=\index.php?page={$category}\{$replace}/a/li; Steve Staples. Steve, The commas are not concatenation. They are separators for the echo construct. I don't know the internals well enough, but ... echo $a.$b.$c; vs echo $a, $b, $c; On the surface, the first instance has to create a temporary variable holding the results of the concatenation before passing it to the echo construct. In the second one, the string representations of each variable are added to the output buffer in order with no need to create a temp var first. So, I think for large strings, using commas should be more efficient. Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On Wed, Jan 12, 2011 at 06:38, David McGlone da...@dmcentral.net wrote: Goes to show ya, even Deaf people aren't perfect spellers. Still like your little joke? ;-) Of course I do. Deafness has nothing to do with spelling. If it did, just imagine how ridiculously difficult it would've been to decipher anything Helen Keller ever wrote. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On Wed, Jan 12, 2011 at 12:08, David Harkness davi...@highgearmedia.com wrote: I tried this with PHP 5.3.2 on Ubuntu 10.04, but when I run any PHP script I get the following. Fatal error in php.ini line 184: Saying a thing doesn't make it so. What does this mean? Looks like you may have installed the PECL extension PHP_BSDetect. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
At 10:35 PM -0500 1/11/11, David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters omehome/a/lilia href=index.php?page=servicesservices/a/lilia h I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- Blessings David M. David: First of all, the type (strict or transitional) of DOCTYPE doesn't matter -- it only matters IF you are going to use deprecated HTML elements (transitional) or not (strict). Second, your li (i.e., list) should start with a type of list tag, such ol for ordered list -- there are several different types (i.e., ol, ul, dir, menu, dl dt dd). Third, you might try this: echo(lia href=\index.php?page=$category\$replace/a/li); The Validator might be objecting to the way you use ' instead of . HTH's Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
If you are going to use double quotes escape out. echo lia href='index.php?page=.$category.'.$replace./a/li; On Jan 12, 2011, at 2:30 PM, tedd tedd.sperl...@gmail.com wrote: At 10:35 PM -0500 1/11/11, David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters Šomehome/a/lilia href=index.php?page=servicesservices/a/lilia hŠ I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- Blessings David M. David: First of all, the type (strict or transitional) of DOCTYPE doesn't matter -- it only matters IF you are going to use deprecated HTML elements (transitional) or not (strict). Second, your li (i.e., list) should start with a type of list tag, such ol for ordered list -- there are several different types (i.e., ol, ul, dir, menu, dl dt dd). Third, you might try this: echo(lia href=\index.php?page=$category\$replace/a/li); The Validator might be objecting to the way you use ' instead of . HTH's Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML errors
Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters …omehome/a/lilia href=index.php?page=servicesservices/a/lilia h… I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- Blessings David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
Hi David: Quote your attribute value in ... On Wed, Jan 12, 2011 at 2:35 PM, David McGlone da...@dmcentral.net wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters …omehome/a/lilia href=index.php?page=servicesservices/a/lilia h… I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- Blessings David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Regards, CHEN Dong
Re: [PHP] HTML errors
On Tue, Jan 11, 2011 at 22:35, David McGlone da...@dmcentral.net wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; } Validator Error: an attribute value must be a literal unless it contains only name characters This is because you misspelled $categorys, where it should actually be $categories. In some of the most recent updates to the core, primarily by Felipe Pena, PHP will now, by default, kick out errors in validation due to misspellings and incorrect grammar. To override this, you must uncomment the following line in your system's php.ini: ;human = true This will allow the parser to understand that you're human, thus capable of mistakes. Please keep in mind, however, that it's only able to be set in php.ini. This is to keep bots and the like from hijacking shared hosts, where an INI_PERDIR setting could potentially be written to the local account by exploitation of a variety of means (including, but not limited to, XSS, file inclusion, and SQL injection techniques). While it may seem a bit of a hassle to need to take this extra step, we all agree that Felipe has done this with the best interests of the community at heart. Having seen the substitutions of 'r' for 'are' and 'u' for 'you' (among many others), he has single-handedly taken it upon himself to use PHP not only as a tool to assist in technological projects, but as a means to teach proper spelling, grammar, and even punctuation to the world (in PHP 7, semicolons will be replaced by commas, periods, and question marks, as appropriate). To learn more about his efforts, go to http://ca2.php.net/spelling-enforcement.php -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML errors
On 1/11/2011 7:35 PM, David McGlone wrote: Hi Everyone, I'm having a problem validating some links I have in a foreach. Here is my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; my PHP code: $categorys = array('home', 'services', 'gallery', 'about_us', 'contact_us', 'testimonials'); foreach($categorys as $category){ $replace = str_replace(_, , $category); echo lia href='index.php?page=$category'$replace/a/li; Try this instead echo 'lia href=index.php?page=',$category,'',$replace,'/a/li'; Jim Lucas } Validator Error: an attribute value must be a literal unless it contains only name characters …omehome/a/lilia href=index.php?page=servicesservices/a/lilia h… I have tried various combinatons and different doctypes. I'm beginning to wonder if this code is allowed at all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML id attribute and arrays
How should I follow the HTML specification while having the passed parameters automatically converted to arrays in PHP? The name attribute, not the id attribute, is used as the key when submitting form values. The name and id attributes do not have to be the same. Thank you, I thought it should be the same (for same reason, maybe compatibility between XHTML and HTML). But could not find anything on the net which states this. So my memories might be corrupted :) Based on first tests, it works (but have not checked the W3C validator yet). Thanks, Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML id attribute and arrays
How should I follow the HTML specification while having the passed parameters automatically converted to arrays in PHP? The name attribute, not the id attribute, is used as the key when submitting form values. The name and id attributes do not have to be the same. Thank you, I thought it should be the same (for same reason, maybe compatibility between XHTML and HTML). But could not find anything on the net which states this. So my memories might be corrupted :) Based on first tests, it works (but have not checked the W3C validator yet). Thanks, Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML id attribute and arrays
On Sun, Dec 19, 2010 at 4:57 PM, Martin C m...@seznam.cz wrote: The name and id attributes do not have to be the same. Thank you, I thought it should be the same (for same reason, maybe compatibility between XHTML and HTML). But could not find anything on the net which states this. So my memories might be corrupted :) You're probably thinking of: http://www.w3.org/TR/html401/struct/links.html#h-12.2.3 The id and name attributes share the same name space. This means that they cannot both define an anchor with the same name in the same document. It is permissible to use both attributes to specify an element's unique identifier for the following elements: A, APPLET, FORM, FRAME, IFRAME, IMG, and MAP. When both attributes are used on a single element, their values must be identical. Confusing, the name attribute on a form field (input, textarea, select, etc) is different to the name attribute on a a or form element, so this rule does not apply to it. -- Benjamin Hawkes-Lewis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML id attribute and arrays
The name and id attributes do not have to be the same. Thank you, I thought it should be the same You're probably thinking of: http://www.w3.org/TR/html401/struct/links.html#h-12.2.3 The id and name attributes share the same name space. This means that they cannot both define an anchor with the same name in the same document. It is permissible to use both attributes to specify an element's unique identifier for the following elements: A, APPLET, FORM, FRAME, IFRAME, IMG, and MAP. When both attributes are used on a single element, their values must be identical. Confusing, the name attribute on a form field (input, textarea, select, etc) is different to the name attribute on a a or form element, so this rule does not apply to it. Thank you, Benjamin, for clarification. This sounds like the source of my (bogus) feeling. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML id attribute and arrays
What are you trying to accomplish? What do you think it wrong with the code below? On 12/17/2010 8:19 AM, Martin C wrote: Hi, PHP converts x[a]=b parameter of the HTTP request as an array named x with its item named a set to value b. So, it seems possible to have the following (X)HTML code: input type=text name=x[a] id=x[a] value=b / Unfortunatelly, HTML specification does not allow neither [ nor ] inside the id attribute. Specifically: * Must begin with a letter A-Z or a-z * Can be followed by: letters (A-Za-z), digits (0-9), hyphens (-), underscores (_), colons (:), and periods (.) * Values are case-sensitive How should I follow the HTML specification while having the passed parameters automatically converted to arrays in PHP? Thank you for any tips, Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML id attribute and arrays
Hi, PHP converts x[a]=b parameter of the HTTP request as an array named x with its item named a set to value b. So, it seems possible to have the following (X)HTML code: input type=text name=x[a] id=x[a] value=b / Unfortunatelly, HTML specification does not allow neither [ nor ] inside the id attribute. Specifically: * Must begin with a letter A-Z or a-z * Can be followed by: letters (A-Za-z), digits (0-9), hyphens (-), underscores (_), colons (:), and periods (.) * Values are case-sensitive How should I follow the HTML specification while having the passed parameters automatically converted to arrays in PHP? Thank you for any tips, Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML id attribute and arrays
Martin C m...@seznam.cz wrote: How should I follow the HTML specification while having the passed parameters automatically converted to arrays in PHP? The name attribute, not the id attribute, is used as the key when submitting form values. The name and id attributes do not have to be the same. -- Benjamin Hawkes-Lewis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
At 10:09 PM -0400 7/6/10, Paul M Foster wrote: On Tue, Jul 06, 2010 at 06:32:40PM +0200, Per Jessen wrote: In principle, I agree - in practice, CPU cycles are getting cheaper by the minute, and being wasted all the time. Not using HTML is highly unlikely to have a measurable impact on anybodys CPU cycles. I keep hearing this argument. Here are what I consider similar arguments. Everyone else pours their waste into the river. Ours won't make that much difference. Our smokestack is just one of hundreds in the city. No one will notice the additional smoke. Putting paint thinner down the toilet won't make any difference. The water processing plant will clean it up. Just because everyone else wastes CPU doesn't mean you have to contribute to it, too. I keep hearing this argument too! There's always two sides to every argument -- to extend your metaphor, as a result of pollution we have the EPA and other environmental concerns who are now so focused on the rules they actually hurt the quality of life for *all* things (the recent Gulf Oil Spill is one of thousands of examples). The application of any rule-set should be tempered with how it affects the whole and not the just a part. The term Waste in the phrase Wasting CPU cycles is dependant upon what yardstick you use to measure what waste means. I do not think it a waste when you break your code into more manageable parts as compared to creating a cryptic routine that simply runs quicker. When creating code, there are things more important things to consider than CPU cycles, such as readability, maintainability, and reusability. Every programmer has to realize that Wasting CPU cycles (like wasting memory) is becoming exponentially less of a problem whereas creating reusable code is doing just the opposite. So when considering waste I hold programmer's time in more regard than CPU cycles. Just because some people write cryptic code, doesn't mean you have too. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On 2010-07-04 11:43 -0400, Al wrote: Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. Browsers ? The web ? I thought it was about email ? If it's HTML, I have to decode and save the email to a file from my MUA and then switch a browser to read it. As you can imagine, I rarely bother. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. That is the only sane approach. -- André Majorel http://www.teaser.fr/~amajorel/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
Paul M Foster wrote: Here is the real problem with HTML email. Any straight text message will swell to many times its size when you HTML-ize it. Okay, so now you're sending the message around the internet to perhaps hundreds or thousands of users, using up many times the bandwidth that the actual message really needs. It's like installing a 100w light bulb when a 60w will do. There's simply no reason to suck CPU cycles all over the internet just to make your message prettier. In principle, I agree - in practice, CPU cycles are getting cheaper by the minute, and being wasted all the time. Not using HTML is highly unlikely to have a measurable impact on anybodys CPU cycles. Besides, HTML is not just about making the message prettier. A number of times I have experienced that important system notifications (from our systems to customers') were simply ignored, apparently due to being plain text. We decided to jazz them up a bit, and it worked. -- Per Jessen, Zürich (25.6°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On Tuesday, July 06, 2010 07:03:58 am Andre Majorel wrote: On 2010-07-04 11:43 -0400, Al wrote: Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. Browsers ? The web ? I thought it was about email ? If it's HTML, I have to decode and save the email to a file from my MUA and then switch a browser to read it. As you can imagine, I rarely bother. I agree, actually my filters are setup to send HTML to the trash can. Its a security risk in some cases. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. That is the only sane approach. -- Russ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On Tue, Jul 06, 2010 at 06:32:40PM +0200, Per Jessen wrote: Paul M Foster wrote: Here is the real problem with HTML email. Any straight text message will swell to many times its size when you HTML-ize it. Okay, so now you're sending the message around the internet to perhaps hundreds or thousands of users, using up many times the bandwidth that the actual message really needs. It's like installing a 100w light bulb when a 60w will do. There's simply no reason to suck CPU cycles all over the internet just to make your message prettier. In principle, I agree - in practice, CPU cycles are getting cheaper by the minute, and being wasted all the time. Not using HTML is highly unlikely to have a measurable impact on anybodys CPU cycles. I keep hearing this argument. Here are what I consider similar arguments. Everyone else pours their waste into the river. Ours won't make that much difference. Our smokestack is just one of hundreds in the city. No one will notice the additional smoke. Putting paint thinner down the toilet won't make any difference. The water processing plant will clean it up. Just because everyone else wastes CPU doesn't mean you have to contribute to it, too. Besides, HTML is not just about making the message prettier. A number of times I have experienced that important system notifications (from our systems to customers') were simply ignored, apparently due to being plain text. We decided to jazz them up a bit, and it worked. s/prettier/more noticeable/g Same point. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On Sun, 2010-07-04 at 23:12 -0400, Paul M Foster wrote: On Sun, Jul 04, 2010 at 11:44:29PM +0100, Ashley Sheridan wrote: snip It is nice to be able to format emails nicely, but you have to realise when to restrain yourself. I've been getting loads of emails from Adobe lately that haven't been formatted well at all, and appear awfully in my email client (Evolution, which I consider to be a very good client) until I download all the images they've used as backgrounds. It's situations like this that give HTML emails an awful name. Isn't this a popular exploit these days? I don't really watch these things since I use Linux and view mail as straight text. But isn't there some current exploit where images which can be downloaded as part of an email actually contain code which can be used to sniff your system or somesuch? Paul -- Paul M. Foster Probably if you're using Outlook I'd imagine so. I think the primary use of images in an email is to track who has read it, as you can reference an image like http://www.somedomain.com/image.php?id=123456 . That's why I have them turned off by default, and hence why Adobes mails always look awful. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] HTML in emails
On 4 July 2010 16:43, Al n...@ridersite.org wrote: What are you folks doing? Al.. One of the tasks I had to develop was the sending of authorised work in a by job report. We receive the work as a fax/email. We log the job in our system. The client comes to our site and confirms the on-cost billing to the job. We produce the invoices for their clients. We produce HTML emails which render just fine in Outlook 2003+, Outlook Express (we are told they are fine - I've never actually bothered), GMail (I use it) and Yahoo's email (again we are told it is OK). Sure, the plain text part for most normal emails is what is read by most developers, but this client isn't a developer. So comments like eye-candy is exactly what it is all about. They use their email tool to read communications. If the communications are easier to understand, laid out nicely, look like the secured webpage, then the customer is a happy one. In producing the HTML, I had to back date my thinking a decade or so. So, I use table and some VERY limited inline styling. Not because I want to. But because the application with the largest market share for reading email in my customer base requires me to do so. Regards, Richard. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
At 11:44 PM +0100 7/4/10, Ashley Sheridan wrote: On Sun, 2010-07-04 at 17:06 -0400, Paul M Foster wrote: On Sun, Jul 04, 2010 at 11:43:59AM -0400, Al wrote: -snip- Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. What are you folks doing? I use mutt for email, so I only see the text portion. That make me an anomaly. However, for example there are various listserv software that will not allow HTML in emails. -snip- Paul -snip- One feature I've seen in some mailing list software is the ability to track how people prefer their email formatted, so that you only send HTML emails to those that want them, and text emails to those who prefer that method. It's the best of both worlds I reckon, and one that is likely to upset as few people as possible; at the worst they might receive one email in a format they don't want before they change their preferences. Ash I agree with both Paul and Ash but for a different reason. Receiving email is much like looking at web sites -- it's data provided from a server to an application to be shown to a user. In the case of web sites, html is provided to a browser and the browser presents the content to the user via the instructions provided by the html and others, such as css and javascript. Unfortunately, if you've done any web sites at all, you know that not all (less than a score of them) browsers are created equal and while your web site may look great in your browser, it sucks in another. It takes a lot of work to make a web site look consistent on all modern browsers. Here's a little something I wrote about it: http://sperling.com/four-things-clients-should-know.php Now throw on to this problem how hundreds of different email applications running under hundreds of different OS's (this includes hand held devices) handle html/css/javascript and you'll have an idea of the size of the problem of how to present data to the user via the user's device. Sending HTML in email isn't the problem, but receiving and displaying HTML in email IS. Simply put, there isn't a standard for sending/receiving email and while clients may want a pretty email to be sent to all their customers, they are clueless as to what their customers will actually receive. Furthermore, there is considerable pressure by clients on developers to create the prefect email. Unfortunately, some developers succumb to the pressure (or they don't know any better) and create a send/receive that works for a special case, namely something sufficient for management to think the problem has been solved but it hasn't -- perhaps that's the reason why Adobe emails look so bad -- management still doesn't understand the problem and their developers either don't know any better, or are afraid to tell management the truth. But proof is in the pudding and while they may think the Emperor's new clothes are magnificent, they aren't. My advice, send text! If you want the end user to see something, then send a link. But do not send HTML in email until every known browser conforms to W3C standards. At that point, then we can start working on hand-held devices to follow the standards as well. When that is finished, then we can consider sending something other than text in an email. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML in emails
I know this is a bit off-topic; but close enough. I'm starting to update the email feature of one of my DB applications and noticed that it appears most of the fancy emails I receive are using just plain old, simple html pages, with a note about not being able to see, go here with a link. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. What are you folks doing? Al.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
Al wrote: I know this is a bit off-topic; but close enough. I'm starting to update the email feature of one of my DB applications and noticed that it appears most of the fancy emails I receive are using just plain old, simple html pages, with a note about not being able to see, go here with a link. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. Yes, multipart/alternative that was. Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. What are you folks doing? We follow the standard and send both text and html. -- Per Jessen, Zürich (24.5°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On Sun, Jul 04, 2010 at 06:31:38PM +0200, Per Jessen wrote: Al wrote: I know this is a bit off-topic; but close enough. I'm starting to update the email feature of one of my DB applications and noticed that it appears most of the fancy emails I receive are using just plain old, simple html pages, with a note about not being able to see, go here with a link. Such emails are stupid. Obviously I can read the email quite fine. The problem is that there is no useful content. Just an instruction to click on a link. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. Yes, multipart/alternative that was. Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. Then I will never read your email. Browsers are for web pages, not email. What are you folks doing? We follow the standard and send both text and html. The text portion is the *only* portion I read. -- When dealing with people, remember you are not dealing with creatures of logic, but creatures of emotion. -- Dale Carnegie Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
Rick Pasotto wrote: On Sun, Jul 04, 2010 at 06:31:38PM +0200, Per Jessen wrote: We follow the standard and send both text and html. The text portion is the *only* portion I read. Cool, that is the whole point. -- Per Jessen, Zürich (24.3°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On Sun, Jul 04, 2010 at 11:43:59AM -0400, Al wrote: I know this is a bit off-topic; but close enough. I'm starting to update the email feature of one of my DB applications and noticed that it appears most of the fancy emails I receive are using just plain old, simple html pages, with a note about not being able to see, go here with a link. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. What are you folks doing? I use mutt for email, so I only see the text portion. That make me an anomaly. However, for example there are various listserv software that will not allow HTML in emails. Here is the real problem with HTML email. Any straight text message will swell to many times its size when you HTML-ize it. Okay, so now you're sending the message around the internet to perhaps hundreds or thousands of users, using up many times the bandwidth that the actual message really needs. It's like installing a 100w light bulb when a 60w will do. There's simply no reason to suck CPU cycles all over the internet just to make your message prettier. I understand that the functions of email and browser seem to be merging. However, this is what I would consider a bad trend. It stems from folks like Microsoft who have convinced people, for example, that spreadsheets function perfectly well as databases. They don't, but that doesn't stop people from using Excel to keep their mailing lists. Of course, opinions like mine won't stop the merging of browsing and reading email. Ah well. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML in emails
On Sun, 2010-07-04 at 17:06 -0400, Paul M Foster wrote: On Sun, Jul 04, 2010 at 11:43:59AM -0400, Al wrote: I know this is a bit off-topic; but close enough. I'm starting to update the email feature of one of my DB applications and noticed that it appears most of the fancy emails I receive are using just plain old, simple html pages, with a note about not being able to see, go here with a link. It use to be that we specified content-type text/html, etc. and sent both the plain ASCII and the html with boundaries and so forth. Seems like, from my preliminary Google searching, I should not waste time with the standard's way and just go straight to sending simple html pages since all modern browsers handle it well. And, it appears to be the way web is going. What are you folks doing? I use mutt for email, so I only see the text portion. That make me an anomaly. However, for example there are various listserv software that will not allow HTML in emails. Here is the real problem with HTML email. Any straight text message will swell to many times its size when you HTML-ize it. Okay, so now you're sending the message around the internet to perhaps hundreds or thousands of users, using up many times the bandwidth that the actual message really needs. It's like installing a 100w light bulb when a 60w will do. There's simply no reason to suck CPU cycles all over the internet just to make your message prettier. I understand that the functions of email and browser seem to be merging. However, this is what I would consider a bad trend. It stems from folks like Microsoft who have convinced people, for example, that spreadsheets function perfectly well as databases. They don't, but that doesn't stop people from using Excel to keep their mailing lists. Of course, opinions like mine won't stop the merging of browsing and reading email. Ah well. Paul -- Paul M. Foster I agree. Obviously the proliferation of free webmail accounts like Live, GMail, Yahoo, etc have had a large impact on the way people consider email. I actually had a friend ask me what this POP3 email thing was, and what made it different from normal email, and it took me a moment to realise his understanding of normal was one of these webmail services available through the browser! It is nice to be able to format emails nicely, but you have to realise when to restrain yourself. I've been getting loads of emails from Adobe lately that haven't been formatted well at all, and appear awfully in my email client (Evolution, which I consider to be a very good client) until I download all the images they've used as backgrounds. It's situations like this that give HTML emails an awful name. One feature I've seen in some mailing list software is the ability to track how people prefer their email formatted, so that you only send HTML emails to those that want them, and text emails to those who prefer that method. It's the best of both worlds I reckon, and one that is likely to upset as few people as possible; at the worst they might receive one email in a format they don't want before they change their preferences. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] HTML in emails
On Sun, Jul 04, 2010 at 11:44:29PM +0100, Ashley Sheridan wrote: snip It is nice to be able to format emails nicely, but you have to realise when to restrain yourself. I've been getting loads of emails from Adobe lately that haven't been formatted well at all, and appear awfully in my email client (Evolution, which I consider to be a very good client) until I download all the images they've used as backgrounds. It's situations like this that give HTML emails an awful name. Isn't this a popular exploit these days? I don't really watch these things since I use Linux and view mail as straight text. But isn't there some current exploit where images which can be downloaded as part of an email actually contain code which can be used to sniff your system or somesuch? Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html analyzer
Hi. I'm trying to build a html analyzer that looks at natural words in html text. I'd like to build a routine that walks through the HTML character by character, but i'm not sure on how to properly walk through escaped and ' characters in javascript or other embedded languages. Skipping the first and ' is no problem, but after that, the escaped and ', they can get difficult imo. If you have any ideas on this i'd like to hear 'm.. -- - Greetings from Rene7705, My free open source webcomponents: http://code.google.com/u/rene7705/ http://mediabeez.ws/downloads (and demos) http://www.facebook.com/rene7705 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
Ashley Sheridan wrote: That last reason could be why your email is failing! HTML email is the one place where it is actually better to code the old way with tables for markup, font tags, and very little (if any) CSS. If you do use any CSS, it's best left inline as well, as some email clients strip out anything within the head tags of your email. Yes, that's exactly what I took away from the conversation. HTML emails should be coded using the old way. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
Hey Guys, Thanks for all the info on this. Sorry for the late reply, but I got sidetracked writing the module that will send out all these nasty emails. I do have the text going on top, and I think I said, looks perfect in Evolution and Thunderbird in both text and HTML. I also read about MS ripping out the IE renderer and going back in time basically. I thought the solution of converting a Word document into HTML with open office is interesting. I'll run that by the client and test it out. Bottom line is, HTML is just a total pain, and yes, the email the client created in HTML using the most update to date CSS and HTML! Thanks! Skip Robert Cummings wrote: Ashley Sheridan wrote: On Thu, 2010-02-04 at 13:44 -0500, Robert Cummings wrote: What about signing yourself up to some newsletters to see how they do it? Looking at the ones I get from Facebook as an example, they use the boundary codes you mentioned, and I can't see anything particularly special that's been added. What order are you sending the two message parts by the way? I think the traditional way is to send the plain/text part first, so that UA's that don't understand or support multipart messages only use the first one. As you mentioned that you're seeing HTML code at the top, I'd hazard a guess that you're sending the HTML first? The problem is most likely NOT his email structure, but the fact that Microsoft in all their lock-in, make things difficult, non standard, monopolistic philosophy chose to switch out the IE HTML renderer (which was getting pretty decent with IE7 and IE8) with the Office HTML renderer... so now basic things like CSS padding of something as simple as a p tag is not possible. You now need to use margins instead. The full list of supported attributes / CSS can be found here: http://msdn.microsoft.com/en-us/library/aa338201.aspx Obviously creating HTML emails was getting too easy (like it is with Thunderbird). Of course... I guess it could be as bad as Google stripping out the stylesheets entirely when viewing HTML content which forces you to put the styles on the tags themselves. ... actually I'm not sure what's worse... at least you can use standard styles with Google's gmail. Either way... making nice looking HTML emails that work across Outlook, Thunderbird, Gmail, Yahoo, and Hotmail is a pain in the ass. Cheers, Rob. If he's getting HTML output at the top of the email, I would think that did suggest that MS Word didn't like the structure. Making HTML emails is now such a difficult job, as the email clients rendering engines tend to not get updated as often as browsers, and there doesn't seem to be any effort in bringing the rendering of the email clients together. Whenever I create these emails I try to make sure I try no to get too creative in the design, and use not only CSS styles, but properties of the HTML tags themselves. It means I end up writing the CSS essentially twice and backing it up with old deprecated HTML attributes, but it usually does the trick. Is there any effort by some standards group that email clients could benefit from? I think I skipped over some relevant information in the original post :) Still... as you've said... email HTML sucks... and MS made it worse. Cheers, Rob. -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
On Fri, 2010-02-12 at 19:03 -0600, Skip Evans wrote: Hey Guys, Thanks for all the info on this. Sorry for the late reply, but I got sidetracked writing the module that will send out all these nasty emails. I do have the text going on top, and I think I said, looks perfect in Evolution and Thunderbird in both text and HTML. I also read about MS ripping out the IE renderer and going back in time basically. I thought the solution of converting a Word document into HTML with open office is interesting. I'll run that by the client and test it out. Bottom line is, HTML is just a total pain, and yes, the email the client created in HTML using the most update to date CSS and HTML! Thanks! Skip Robert Cummings wrote: Ashley Sheridan wrote: On Thu, 2010-02-04 at 13:44 -0500, Robert Cummings wrote: What about signing yourself up to some newsletters to see how they do it? Looking at the ones I get from Facebook as an example, they use the boundary codes you mentioned, and I can't see anything particularly special that's been added. What order are you sending the two message parts by the way? I think the traditional way is to send the plain/text part first, so that UA's that don't understand or support multipart messages only use the first one. As you mentioned that you're seeing HTML code at the top, I'd hazard a guess that you're sending the HTML first? The problem is most likely NOT his email structure, but the fact that Microsoft in all their lock-in, make things difficult, non standard, monopolistic philosophy chose to switch out the IE HTML renderer (which was getting pretty decent with IE7 and IE8) with the Office HTML renderer... so now basic things like CSS padding of something as simple as a p tag is not possible. You now need to use margins instead. The full list of supported attributes / CSS can be found here: http://msdn.microsoft.com/en-us/library/aa338201.aspx Obviously creating HTML emails was getting too easy (like it is with Thunderbird). Of course... I guess it could be as bad as Google stripping out the stylesheets entirely when viewing HTML content which forces you to put the styles on the tags themselves. ... actually I'm not sure what's worse... at least you can use standard styles with Google's gmail. Either way... making nice looking HTML emails that work across Outlook, Thunderbird, Gmail, Yahoo, and Hotmail is a pain in the ass. Cheers, Rob. If he's getting HTML output at the top of the email, I would think that did suggest that MS Word didn't like the structure. Making HTML emails is now such a difficult job, as the email clients rendering engines tend to not get updated as often as browsers, and there doesn't seem to be any effort in bringing the rendering of the email clients together. Whenever I create these emails I try to make sure I try no to get too creative in the design, and use not only CSS styles, but properties of the HTML tags themselves. It means I end up writing the CSS essentially twice and backing it up with old deprecated HTML attributes, but it usually does the trick. Is there any effort by some standards group that email clients could benefit from? I think I skipped over some relevant information in the original post :) Still... as you've said... email HTML sucks... and MS made it worse. Cheers, Rob. -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut That last reason could be why your email is failing! HTML email is the one place where it is actually better to code the old way with tables for markup, font tags, and very little (if any) CSS. If you do use any CSS, it's best left inline as well, as some email clients strip out anything within the head tags of your email. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] HTML plain text in Outlook 2007
Ashley Sheridan wrote: That last reason could be why your email is failing! HTML email is the one place where it is actually better to code the old way with tables for markup, font tags, and very little (if any) CSS. If you do use any CSS, it's best left inline as well, as some email clients strip out anything within the head tags of your email. Do e-mail clients handle RTF? That would seem a better way to do fancy styled e-mail to me than to use html tags in an e-mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
Michael A. Peters wrote: Ashley Sheridan wrote: That last reason could be why your email is failing! HTML email is the one place where it is actually better to code the old way with tables for markup, font tags, and very little (if any) CSS. If you do use any CSS, it's best left inline as well, as some email clients strip out anything within the head tags of your email. Do e-mail clients handle RTF? That would seem a better way to do fancy styled e-mail to me than to use html tags in an e-mail. aside em*tongue in cheek*/em I do HTML emails for the semantic tags!! /aside :B Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
On 4 February 2010 16:44, Skip Evans s...@bigskypenguin.com wrote: Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half-assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I create HTML.Mime based emails in PHP with a plain text part which is basically a cop out saying that they should upgrade. The HTML part is a fax form. They print it out, add some stickers relating to work carried out and then fax it back (or email it as a TIFF or PDF if they have the skills/tech to do that). I use Outlook 2003 (work) and GMail via Chrome (personal). The form includes embedded images (essentially their logo as the forms are passed to their clients) and have a PDF attached ( a report from our systems about the email they are receiving). All fairly simple. 1 - Plain Text - (Please upgrade) 2 - Alternative HTML 3 - Embedded images 4 - Attachment For this, I use RMail from phpguru.org (previously known as html_mime_mail5) http://www.phpguru.org/static/Rmail The HTML I used contains limited CSS and is table based. I initially did it properly, or so I thought. I'd used IE7/FireFox/Safari/Opera as a test of a proper HTML page with CSS to produce a nice looking form. Scaled nicely, limited shrink, etc. Looked OK in Outlook 2003 too! But when I sent them for approval to the line manager, who uses Outlook 2007, well, let's just say he didn't understand the form at all! Even when I redid it with tables, I'd used thead, tfoot, tbody (proper HTML at least). In O2K7? It renders in order - header, footer, body. Great! So, the HTML I ended up with REALLY looks like something from when I was first learning HTML (I just worked it out as being 13 years ago!). So, yes. The code is horribly old fashioned. But it works. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
Ire ently needed to do this for a client as well. I took their word doc and converted it to HTML with open office. This created a template that I just do some search and replace to fill in the criteria. This has worked very well with outlook and hotmail and gmail. Not sure if it will fit your needs, but it could be worth a try. Bastien Sent from my iPod On Feb 5, 2010, at 5:32 AM, Richard Quadling rquadl...@googlemail.com wrote: On 4 February 2010 16:44, Skip Evans s...@bigskypenguin.com wrote: Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half- assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I create HTML.Mime based emails in PHP with a plain text part which is basically a cop out saying that they should upgrade. The HTML part is a fax form. They print it out, add some stickers relating to work carried out and then fax it back (or email it as a TIFF or PDF if they have the skills/tech to do that). I use Outlook 2003 (work) and GMail via Chrome (personal). The form includes embedded images (essentially their logo as the forms are passed to their clients) and have a PDF attached ( a report from our systems about the email they are receiving). All fairly simple. 1 - Plain Text - (Please upgrade) 2 - Alternative HTML 3 - Embedded images 4 - Attachment For this, I use RMail from phpguru.org (previously known as html_mime_mail5) http://www.phpguru.org/static/Rmail The HTML I used contains limited CSS and is table based. I initially did it properly, or so I thought. I'd used IE7/FireFox/Safari/Opera as a test of a proper HTML page with CSS to produce a nice looking form. Scaled nicely, limited shrink, etc. Looked OK in Outlook 2003 too! But when I sent them for approval to the line manager, who uses Outlook 2007, well, let's just say he didn't understand the form at all! Even when I redid it with tables, I'd used thead, tfoot, tbody (proper HTML at least). In O2K7? It renders in order - header, footer, body. Great! So, the HTML I ended up with REALLY looks like something from when I was first learning HTML (I just worked it out as being 13 years ago!). So, yes. The code is horribly old fashioned. But it works. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
On Fri, 2010-02-05 at 08:03 -0500, Phpster wrote: Ire ently needed to do this for a client as well. I took their word doc and converted it to HTML with open office. This created a template that I just do some search and replace to fill in the criteria. This has worked very well with outlook and hotmail and gmail. Not sure if it will fit your needs, but it could be worth a try. Bastien Sent from my iPod On Feb 5, 2010, at 5:32 AM, Richard Quadling rquadl...@googlemail.com wrote: On 4 February 2010 16:44, Skip Evans s...@bigskypenguin.com wrote: Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half- assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I create HTML.Mime based emails in PHP with a plain text part which is basically a cop out saying that they should upgrade. The HTML part is a fax form. They print it out, add some stickers relating to work carried out and then fax it back (or email it as a TIFF or PDF if they have the skills/tech to do that). I use Outlook 2003 (work) and GMail via Chrome (personal). The form includes embedded images (essentially their logo as the forms are passed to their clients) and have a PDF attached ( a report from our systems about the email they are receiving). All fairly simple. 1 - Plain Text - (Please upgrade) 2 - Alternative HTML 3 - Embedded images 4 - Attachment For this, I use RMail from phpguru.org (previously known as html_mime_mail5) http://www.phpguru.org/static/Rmail The HTML I used contains limited CSS and is table based. I initially did it properly, or so I thought. I'd used IE7/FireFox/Safari/Opera as a test of a proper HTML page with CSS to produce a nice looking form. Scaled nicely, limited shrink, etc. Looked OK in Outlook 2003 too! But when I sent them for approval to the line manager, who uses Outlook 2007, well, let's just say he didn't understand the form at all! Even when I redid it with tables, I'd used thead, tfoot, tbody (proper HTML at least). In O2K7? It renders in order - header, footer, body. Great! So, the HTML I ended up with REALLY looks like something from when I was first learning HTML (I just worked it out as being 13 years ago!). So, yes. The code is horribly old fashioned. But it works. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It's the testing part that takes the time though. You've got the email clients that are only available on Windows, the ones that are only available on Macs, those that are only around on Linux, and then those that are only accessible online. There are companies that test emails
Re: [PHP] HTML plain text in Outlook 2007
Ashley Sheridan wrote: On Thu, 2010-02-04 at 13:44 -0500, Robert Cummings wrote: What about signing yourself up to some newsletters to see how they do it? Looking at the ones I get from Facebook as an example, they use the boundary codes you mentioned, and I can't see anything particularly special that's been added. What order are you sending the two message parts by the way? I think the traditional way is to send the plain/text part first, so that UA's that don't understand or support multipart messages only use the first one. As you mentioned that you're seeing HTML code at the top, I'd hazard a guess that you're sending the HTML first? The problem is most likely NOT his email structure, but the fact that Microsoft in all their lock-in, make things difficult, non standard, monopolistic philosophy chose to switch out the IE HTML renderer (which was getting pretty decent with IE7 and IE8) with the Office HTML renderer... so now basic things like CSS padding of something as simple as a p tag is not possible. You now need to use margins instead. The full list of supported attributes / CSS can be found here: http://msdn.microsoft.com/en-us/library/aa338201.aspx Obviously creating HTML emails was getting too easy (like it is with Thunderbird). Of course... I guess it could be as bad as Google stripping out the stylesheets entirely when viewing HTML content which forces you to put the styles on the tags themselves. ... actually I'm not sure what's worse... at least you can use standard styles with Google's gmail. Either way... making nice looking HTML emails that work across Outlook, Thunderbird, Gmail, Yahoo, and Hotmail is a pain in the ass. Cheers, Rob. If he's getting HTML output at the top of the email, I would think that did suggest that MS Word didn't like the structure. Making HTML emails is now such a difficult job, as the email clients rendering engines tend to not get updated as often as browsers, and there doesn't seem to be any effort in bringing the rendering of the email clients together. Whenever I create these emails I try to make sure I try no to get too creative in the design, and use not only CSS styles, but properties of the HTML tags themselves. It means I end up writing the CSS essentially twice and backing it up with old deprecated HTML attributes, but it usually does the trick. Is there any effort by some standards group that email clients could benefit from? I think I skipped over some relevant information in the original post :) Still... as you've said... email HTML sucks... and MS made it worse. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML plain text in Outlook 2007
Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half-assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
On Thu, 2010-02-04 at 10:44 -0600, Skip Evans wrote: Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half-assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut What about signing yourself up to some newsletters to see how they do it? Looking at the ones I get from Facebook as an example, they use the boundary codes you mentioned, and I can't see anything particularly special that's been added. What order are you sending the two message parts by the way? I think the traditional way is to send the plain/text part first, so that UA's that don't understand or support multipart messages only use the first one. As you mentioned that you're seeing HTML code at the top, I'd hazard a guess that you're sending the HTML first? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] HTML plain text in Outlook 2007
Ashley Sheridan wrote: On Thu, 2010-02-04 at 10:44 -0600, Skip Evans wrote: Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half-assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut What about signing yourself up to some newsletters to see how they do it? Looking at the ones I get from Facebook as an example, they use the boundary codes you mentioned, and I can't see anything particularly special that's been added. What order are you sending the two message parts by the way? I think the traditional way is to send the plain/text part first, so that UA's that don't understand or support multipart messages only use the first one. As you mentioned that you're seeing HTML code at the top, I'd hazard a guess that you're sending the HTML first? The problem is most likely NOT his email structure, but the fact that Microsoft in all their lock-in, make things difficult, non standard, monopolistic philosophy chose to switch out the IE HTML renderer (which was getting pretty decent with IE7 and IE8) with the Office HTML renderer... so now basic things like CSS padding of something as simple as a p tag is not possible. You now need to use margins instead. The full list of supported attributes / CSS can be found here: http://msdn.microsoft.com/en-us/library/aa338201.aspx Obviously creating HTML emails was getting too easy (like it is with Thunderbird). Of course... I guess it could be as bad as Google stripping out the stylesheets entirely when viewing HTML content which forces you to put the styles on the tags themselves. ... actually I'm not sure what's worse... at least you can use standard styles with Google's gmail. Either way... making nice looking HTML emails that work across Outlook, Thunderbird, Gmail, Yahoo, and Hotmail is a pain in the ass. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML plain text in Outlook 2007
On Thu, 2010-02-04 at 13:44 -0500, Robert Cummings wrote: Ashley Sheridan wrote: On Thu, 2010-02-04 at 10:44 -0600, Skip Evans wrote: Hey all, First, let me say thanks for all the advice on Magento, and especially to Ryan who has used the beast and gave some great advice on skinning, links to some good docs and a book just for my designer. We'll be using and I'm looking forward to learning it. But anyway... I'm doing some maintenance work on a system that sends an email message using the multi-part boundaries to include both a plain text version and an HTML version of an email. I've read up on this before, but never actually done it. So implementing the code was not a big issue, and in fact it works perfectly when tested on my Ubuntu machine using Thunderbird to test the HTML and Evolution to test the plain text version. In fact, I can switch formats on both of these and all looks great. Enter Microsoft (Insert opening of Bach's Toccata and Fugue in D minor to send chills up my readers' spines.) On Outlook 2007 in HTML mode it renders, how can I put this... half-assedly. In text mode the whole things a bust. There is the HTML code all stuffed up at the top, boundary codes are visible, just plain awful. Googling around I see articles from 2007 when that version of Outlook came out lamenting the fact that MS pulled the IE rendering engine from it and replaced it with MS Word's renderer to plug security holes expoitable via email. Does anyone have any experience with HTML plain text multi-part messages and Outlook 2007, or any tips how I can get this working? Still Googling, but any tips would be greatly appreciated. Skip -- Skip Evans PenguinSites.com, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://penguinsites.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut What about signing yourself up to some newsletters to see how they do it? Looking at the ones I get from Facebook as an example, they use the boundary codes you mentioned, and I can't see anything particularly special that's been added. What order are you sending the two message parts by the way? I think the traditional way is to send the plain/text part first, so that UA's that don't understand or support multipart messages only use the first one. As you mentioned that you're seeing HTML code at the top, I'd hazard a guess that you're sending the HTML first? The problem is most likely NOT his email structure, but the fact that Microsoft in all their lock-in, make things difficult, non standard, monopolistic philosophy chose to switch out the IE HTML renderer (which was getting pretty decent with IE7 and IE8) with the Office HTML renderer... so now basic things like CSS padding of something as simple as a p tag is not possible. You now need to use margins instead. The full list of supported attributes / CSS can be found here: http://msdn.microsoft.com/en-us/library/aa338201.aspx Obviously creating HTML emails was getting too easy (like it is with Thunderbird). Of course... I guess it could be as bad as Google stripping out the stylesheets entirely when viewing HTML content which forces you to put the styles on the tags themselves. ... actually I'm not sure what's worse... at least you can use standard styles with Google's gmail. Either way... making nice looking HTML emails that work across Outlook, Thunderbird, Gmail, Yahoo, and Hotmail is a pain in the ass. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP If he's getting HTML output at the top of the email, I would think that did suggest that MS Word didn't like the structure. Making HTML emails is now such a difficult job, as the email clients rendering engines tend to not get updated as often as browsers, and there doesn't seem to be any effort in bringing the rendering of the email clients together. Whenever I create these emails I try to make sure I try no to get too creative in the design, and use not only CSS styles, but properties of the HTML tags themselves. It means I end up writing the CSS essentially twice and backing it up with old deprecated HTML attributes, but it usually does the trick. Is there any effort by some standards group that email clients could benefit from? Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] html email showing br instead of line breaks
I have users enter support tickets into a a textarea form and then it emails it to me, I'm trying to get the emails to display when they hit enter correctly, so i'm changing the \r\n to br, but in the email i'm getting, its displaying the br instead of a line break: here is the code: $message = htmlheadtitlenew support request #.mysqli_insert_id($mysqli)./title/headbodyp Hello, .$_SESSION[full_name]. has created a new support request. Please log in at a href=\http://intra/helpdesk\;MDAH Helpdesk/a. The problem request is \; $message .= htmlspecialchars(str_replace('\r\n', 'br', $_POST[problem])); $message .= \ and the best time to contact is \.htmlspecialchars($_POST[contact_time]).\ /p/body/html; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n; $headers .= From: .$_SESSION[full_name]..$_SESSION[username].@mdah.state.ms.us .\r\n . X-Mailer: PHP/ . phpversion(); mail('isst...@mdah.state.ms.us', $subject, $message, $headers); but the email I get is: Hello, Karen Redhead has created a new support request. Please log in at MDAH Helpdesk http://intra/helpdesk. The problem request is Elaine is out today but her computer no longer has Past Perfect from what I can tell. Also how does she access her email. The Sea Monkey email icon does not take you anywhere.brThanks so much,brKaren and the best time to contact is 1:30 -5:00 How come the email is being displayed with br instead of line breaks?
Re: [PHP] html email showing br instead of line breaks
\r\n should be between double quotes: \r\n On Thu, Sep 24, 2009 at 3:52 PM, Adam Williams awill...@mdah.state.ms.us wrote: I have users enter support tickets into a a textarea form and then it emails it to me, I'm trying to get the emails to display when they hit enter correctly, so i'm changing the \r\n to br, but in the email i'm getting, its displaying the br instead of a line break: here is the code: $message = htmlheadtitlenew support request #.mysqli_insert_id($mysqli)./title/headbodyp Hello, .$_SESSION[full_name]. has created a new support request. Please log in at a href=\http://intra/helpdesk\;MDAH Helpdesk/a. The problem request is \; $message .= htmlspecialchars(str_replace('\r\n', 'br', $_POST[problem])); $message .= \ and the best time to contact is \.htmlspecialchars($_POST[contact_time]).\ /p/body/html; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n; $headers .= From: .$_SESSION[full_name]..$_SESSION[username].@mdah.state.ms.us .\r\n . X-Mailer: PHP/ . phpversion(); mail('isst...@mdah.state.ms.us', $subject, $message, $headers); but the email I get is: Hello, Karen Redhead has created a new support request. Please log in at MDAH Helpdesk http://intra/helpdesk. The problem request is Elaine is out today but her computer no longer has Past Perfect from what I can tell. Also how does she access her email. The Sea Monkey email icon does not take you anywhere.brThanks so much,brKaren and the best time to contact is 1:30 -5:00 How come the email is being displayed with br instead of line breaks? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html email showing br instead of line breaks
Thanks, i'll try that. what is the difference in using '' and ? I thought they were interchangeable. Jonathan Tapicer wrote: \r\n should be between double quotes: \r\n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html email showing br instead of line breaks
oh nevermind, i see double quotes translate the \r\n to its appropriate EOL character. Adam Williams wrote: Thanks, i'll try that. what is the difference in using '' and ? I thought they were interchangeable. Jonathan Tapicer wrote: \r\n should be between double quotes: \r\n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html email showing br instead of line breaks
Double quotes accept special characters and string interpolation, see the manual: http://php.net/manual/en/language.types.string.php On Thu, Sep 24, 2009 at 4:00 PM, Adam Williams awill...@mdah.state.ms.us wrote: Thanks, i'll try that. what is the difference in using '' and ? I thought they were interchangeable. Jonathan Tapicer wrote: \r\n should be between double quotes: \r\n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html email showing br instead of line breaks
Have you tried http://es.php.net/manual/en/function.nl2br.php ? I think it's easier and fits your needs. De: Adam Williams awill...@mdah.state.ms.us Para: PHP General list php-general@lists.php.net Enviado: jueves, 24 de septiembre, 2009 20:52:13 Asunto: [PHP] html email showing br instead of line breaks I have users enter support tickets into a a textarea form and then it emails it to me, I'm trying to get the emails to display when they hit enter correctly, so i'm changing the \r\n to br, but in the email i'm getting, its displaying the br instead of a line break: here is the code: $message = htmlheadtitlenew support request #.mysqli_insert_id($mysqli)./title/headbodyp Hello, .$_SESSION[full_name]. has created a new support request. Please log in at a href=\http://intra/helpdesk\;MDAH Helpdesk/a. The problem request is \; $message .= htmlspecialchars(str_replace('\r\n', 'br', $_POST[problem])); $message .= \ and the best time to contact is \.htmlspecialchars($_POST[contact_time]).\ /p/body/html; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n; $headers .= From: .$_SESSION[full_name]..$_SESSION[username].@mdah.state.ms.us .\r\n . X-Mailer: PHP/ . phpversion(); mail('isst...@mdah.state.ms.us', $subject, $message, $headers); but the email I get is: Hello, Karen Redhead has created a new support request. Please log in at MDAH Helpdesk http://intra/helpdesk. The problem request is Elaine is out today but her computer no longer has Past Perfect from what I can tell. Also how does she access her email. The Sea Monkey email icon does not take you anywhere.brThanks so much,brKaren and the best time to contact is 1:30 -5:00 How come the email is being displayed with br instead of line breaks?
Re: [PHP] html email showing br instead of line breaks
\r\n should be between double quotes: \r\n I think you'll still see the literal brs in your final email, though because htmlspecialchars() is converting the angle-brackets in the tag to their respective HTML entities (lt; for and gt; for ). A bit of a thorny problem because you probably do want to escape HTML-characters in the message for security purposes. I suppose you could call str_replace() after htmlspecialchars(), instead of before it as you currently do. OTOH, why not just send your email as plain text, instead of HTML? Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML text extraction
Hello, on 08/18/2009 05:37 AM leledumbo said the following: Usually, a website gives preview of its articles by extracting some of the first characters. This is easy if the article is a pure text, but what if it's a HTML text? For instance, if I have the full text: p bla bla bla ul liitem 1/li liitem 2/li liitem 3/li /ul /p and I take the first 40 characters, it would result in: p bla bla bla ul liitem As you can see, the tags are incomplete and it might break other texts below it (I mean, other than this preview). I need a way to solve this problem. You may want to try these HTML parser classes. They can parse (and even validate) HTML and return an array of tag or data elements. You can use it to pick the first tags and data you. Then you you the RewriteElement function to regenerate the HTML. http://www.phpclasses.org/secure-html-filter -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML text extraction
Usually, a website gives preview of its articles by extracting some of the first characters. This is easy if the article is a pure text, but what if it's a HTML text? For instance, if I have the full text: p bla bla bla ul liitem 1/li liitem 2/li liitem 3/li /ul /p and I take the first 40 characters, it would result in: p bla bla bla ul liitem As you can see, the tags are incomplete and it might break other texts below it (I mean, other than this preview). I need a way to solve this problem. -- View this message in context: http://www.nabble.com/HTML-text-extraction-tp25020687p25020687.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML text extraction
On Tue, 2009-08-18 at 01:37 -0700, leledumbo wrote: Usually, a website gives preview of its articles by extracting some of the first characters. This is easy if the article is a pure text, but what if it's a HTML text? For instance, if I have the full text: p bla bla bla ul liitem 1/li liitem 2/li liitem 3/li /ul /p and I take the first 40 characters, it would result in: p bla bla bla ul liitem As you can see, the tags are incomplete and it might break other texts below it (I mean, other than this preview). I need a way to solve this problem. -- View this message in context: http://www.nabble.com/HTML-text-extraction-tp25020687p25020687.html Sent from the PHP - General mailing list archive at Nabble.com. You could do a couple of things: * Extract all the content and use strip_tags() to remove all the HTML markup. In the example you gave it might look a bit odd if the content suggests it was originally a list. * Access the extracted content through the DOM, and grab the textual content you need using node values. That way, you can limit it to a specific character count of content, and with a bit of work, you can preserve the original markup tags too Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML text extraction
HI, ... The easy way (Back to the Future 2 anyone...?) would be to use strip_tags() first: http://uk.php.net/strip_tags -- Richard Heyes HTML5 graphing: RGraph - www.rgraph.net (updated 8th August) Lots of PHP and Javascript code - http://www.phpguru.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
On Tue, May 26, 2009 at 4:36 PM, Michael A. Peters mpet...@mac.com wrote: kranthi wrote: seems more of a firefox question than a PHP question... just replace form id=formemail method=post action=UserPrefs with form id=formemail method=post action=UserPrefs autocomplete=off https://developer.mozilla.org/en/How_to_Turn_Off_form_Autocompletion Thanks! I found that for xhtml I had to use following DOCTYPE to get it to validate: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; [ !ATTLIST form autocomplete CDATA #IMPLIED ] From what I gather though did not try, sent with improper text/html mime type, browsers add a bogus ] to top of output, declaring an ATTLIST should only be done if sent as application/xhtml+xml I still have to check and see how opera reacts to that (IE gets html version of my pages so it won't get that anyway, I can't test safari) html won't validate with that attribute, but that's OK I guess. Maybe it will in html 5 (I don't know) but that's not even stable yet. I'd prefer it to be at the input level rather than form level, the problem (and I think it is a firefox bug) is that it assumes an input before a password the same form as a password is a login name. I *might* actually be able to just move the password field above the e-mail change and fix it. But the autocomplete='off' is very useful to me for another form where users add GPS coordinates, which are from within shasta county and thus all very close, unless the records are for identical coordinates they'll never be the same and if they are identical, using the autocomplete feature risks a mistake of selecting the wrong one thus resulting in bogus data. I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML The discussion is primarily centered around banks using it to prevent browsers from remembering your login credentials for their web sites, and the idea that the user should ultimately remain in control of the browser and that a website should not be able to assert control against the user's wishes (in this case by preventing the user from using the form manager or password manager to store the information). Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
Andrew Ballard wrote: On Tue, May 26, 2009 at 4:36 PM, Michael A. Peters mpet...@mac.com wrote: kranthi wrote: seems more of a firefox question than a PHP question... just replace form id=formemail method=post action=UserPrefs with form id=formemail method=post action=UserPrefs autocomplete=off https://developer.mozilla.org/en/How_to_Turn_Off_form_Autocompletion Thanks! I found that for xhtml I had to use following DOCTYPE to get it to validate: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; [ !ATTLIST form autocomplete CDATA #IMPLIED ] From what I gather though did not try, sent with improper text/html mime type, browsers add a bogus ] to top of output, declaring an ATTLIST should only be done if sent as application/xhtml+xml I still have to check and see how opera reacts to that (IE gets html version of my pages so it won't get that anyway, I can't test safari) html won't validate with that attribute, but that's OK I guess. Maybe it will in html 5 (I don't know) but that's not even stable yet. I'd prefer it to be at the input level rather than form level, the problem (and I think it is a firefox bug) is that it assumes an input before a password the same form as a password is a login name. I *might* actually be able to just move the password field above the e-mail change and fix it. But the autocomplete='off' is very useful to me for another form where users add GPS coordinates, which are from within shasta county and thus all very close, unless the records are for identical coordinates they'll never be the same and if they are identical, using the autocomplete feature risks a mistake of selecting the wrong one thus resulting in bogus data. I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML The discussion is primarily centered around banks using it to prevent browsers from remembering your login credentials for their web sites, and the idea that the user should ultimately remain in control of the browser and that a website should not be able to assert control against the user's wishes (in this case by preventing the user from using the form manager or password manager to store the information). Andrew I have no problem with browsers giving users an option to disable it. I have no problem with browsers ignoring anything that is not defined in the DTD - though technically the way I did it, that attribute is defined in the DTD. All a bank needs to do is provide a custom DTD and they can have it. Browsers that refuse to autocomplete don't get certified and thus won't work with the bank, many bank web sites are very picky about what a browser must to before they'll certify it and allow it at their bank. Several years ago I was stuck needing to install binary Netscape 7 in Linux - same code base as Mozilla 1 - because Mozilla 1 wasn't certified at my bank, Netscape 7 was. Yes, you can fake browser strings and get around it, but only a few people will. Microsoft won't yank autocomplete=off out of their browser, and FireFox won't want IE to to be the only browser that works with banks. Users who really don't want it could probably use a firefox extension that ignores the attribute if they really want autocomplete in their bank forms. In my case I want it turned off because FireFox does the wrong thing. It should look at the input name attribute before auto-completing, but it doesn't - it assumes a password field means the field before it is a login field. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
Andrew Ballard wrote: I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML That page says: When writing HTML, such authors should declare and validate against a custom doctype including the autocomplete attribute (example HTML document). However, there is currently no way to trigger the same user agent functionality with an attribute in XHTML. This constitutes an unnecessary obstacle to the adoption of XML-based markup. That page is wrong. It took me 10 minutes in google to find a way to do it in xhtml and have the xhtml validate. And I didn't have to use a custom DTD. Only thing I had to do is send the application/xhtml+xml header - which I already send, as that's the proper way to serve xhtml 1.1. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
On Thu, Jun 4, 2009 at 12:33 PM, Michael A. Peters mpet...@mac.com wrote: Andrew Ballard wrote: I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML That page says: When writing HTML, such authors should declare and validate against a custom doctype including the autocomplete attribute (example HTML document). However, there is currently no way to trigger the same user agent functionality with an attribute in XHTML. This constitutes an unnecessary obstacle to the adoption of XML-based markup. That page is wrong. It took me 10 minutes in google to find a way to do it in xhtml and have the xhtml validate. And I didn't have to use a custom DTD. Only thing I had to do is send the application/xhtml+xml header - which I already send, as that's the proper way to serve xhtml 1.1. I wasn't really taking a position on the issue. I just thought it worth noting that there seems to be a contingent that wants to remove the attribute. From what I read, they have already conceded to language that says a user-agent may choose to implement it, but is not required to do so. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html and password management
From: Andrew Ballard On Thu, Jun 4, 2009 at 12:33 PM, Michael A. Peters mpet...@mac.com wrote: Andrew Ballard wrote: I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_us ing_XHTML That page says: When writing HTML, such authors should declare and validate against a custom doctype including the autocomplete attribute (example HTML document). However, there is currently no way to trigger the same user agent functionality with an attribute in XHTML. This constitutes an unnecessary obstacle to the adoption of XML-based markup. That page is wrong. It took me 10 minutes in google to find a way to do it in xhtml and have the xhtml validate. And I didn't have to use a custom DTD. Only thing I had to do is send the application/xhtml+xml header - which I already send, as that's the proper way to serve xhtml 1.1. I wasn't really taking a position on the issue. I just thought it worth noting that there seems to be a contingent that wants to remove the attribute. From what I read, they have already conceded to language that says a user-agent may choose to implement it, but is not required to do so. There is nothing to remove. It is a proprietary extension and not likely to ever be accepted as part of the W3C standards. As such, it won't be in any W3C DTD, but will always require a custom DTD be supplied locally. Each browser supplier must decide whether to support it or leave it out. From my viewpoint, the bigger need is to educate administrators of publicly available computers to disable autocomplete in the browser configuration. If they would do that, when you go to the workstation in the library, you can't see the credentials of the last user, and the next user won't be able to retrieve yours. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
Bob McConnell wrote: From my viewpoint, the bigger need is to educate administrators of publicly available computers to disable autocomplete in the browser configuration. If they would do that, when you go to the workstation in the library, you can't see the credentials of the last user, and the next user won't be able to retrieve yours. It's not just public workstations. It's your baby sitter's boyfriend who comes over after she has put your little ones to bed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
seems more of a firefox question than a PHP question... just replace form id=formemail method=post action=UserPrefs with form id=formemail method=post action=UserPrefs autocomplete=off https://developer.mozilla.org/en/How_to_Turn_Off_form_Autocompletion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
kranthi wrote: seems more of a firefox question than a PHP question... just replace form id=formemail method=post action=UserPrefs with form id=formemail method=post action=UserPrefs autocomplete=off https://developer.mozilla.org/en/How_to_Turn_Off_form_Autocompletion Thanks! I found that for xhtml I had to use following DOCTYPE to get it to validate: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; [ !ATTLIST form autocomplete CDATA #IMPLIED ] From what I gather though did not try, sent with improper text/html mime type, browsers add a bogus ] to top of output, declaring an ATTLIST should only be done if sent as application/xhtml+xml I still have to check and see how opera reacts to that (IE gets html version of my pages so it won't get that anyway, I can't test safari) html won't validate with that attribute, but that's OK I guess. Maybe it will in html 5 (I don't know) but that's not even stable yet. I'd prefer it to be at the input level rather than form level, the problem (and I think it is a firefox bug) is that it assumes an input before a password the same form as a password is a login name. I *might* actually be able to just move the password field above the e-mail change and fix it. But the autocomplete='off' is very useful to me for another form where users add GPS coordinates, which are from within shasta county and thus all very close, unless the records are for identical coordinates they'll never be the same and if they are identical, using the autocomplete feature risks a mistake of selecting the wrong one thus resulting in bogus data. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html and password management
I'm working on the user registration part of my site. User registration works fine, but there's an oddity with password management. The use I registered is username: someone After logging in, I told firefox to save the username and password. I then went to the UserPrefs page to test both e-mail and password change. http://www.clfsrpm.net/someone.png FireFox for some reason auto-filled in the username in the verify e-mail field for the Update E-Mail Address form. Even though the form requires valid login to even see, for security reasons I want valid password entered. I don't mind the auto-filling in of the password by firefox, I do mind that it decided to put the login name in the field before it. Here's the html for that form: h2Account Settings/h2 form id=formemail method=post action=UserPrefs fieldset id=fieldsetemail class=leftFloat legendUpdate E-Mail Address/legend pstrongNOTE/strong: Updating your e-mail address will result in a temporarily disabled account until your new e-mail address has been validated./p div id=divemail class=formFloat p label for=emailNew E-Mail/label br/ input type=text id=email name=email size=64/ /p p label for=vemailVerify New E-Mail/label br/ input type=text id=vemail name=vemail size=64/ /p /div div id=divemailpassword class=formFloat p labelEnter Current Password/label br/ input type=password id=emailpassword name=password size=20/ /p /div /fieldset div id=email_submit class=formFloat input type=hidden name=ptoken value=*snip*/ input type=submit id=imail name=imail value=Submit/ /div /form The id for the input it is incorrectly auto-filling is vemail. Is there a way to flag firefox not to autofill the username for that form? I thought it would be smart enough not to because the field name/id is different than the login field id/name but apparantly not. Furthermore, when testing the e-mail change, FireFox asked if I wanted to save the password. I said yet to see what happens - and now it has the e-mail stored as a possible username for the site, which is blatently wrong. There must be a way to disable it. I suppose I could remove the password field from the form, and upon submit - then ask for password verification on a different form, but that seems kind of sucky. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
Michael A. Peters wrote: I'm working on the user registration part of my site. User registration works fine, but there's an oddity with password management. The use I registered is username: someone After logging in, I told firefox to save the username and password. I then went to the UserPrefs page to test both e-mail and password change. http://www.clfsrpm.net/someone.png FireFox for some reason auto-filled in the username in the verify e-mail field for the Update E-Mail Address form. Even though the form requires valid login to even see, for security reasons I want valid password entered. I don't mind the auto-filling in of the password by firefox, I do mind that it decided to put the login name in the field before it. Here's the html for that form: *snip* For now I'm just not requiring password for e-mail change, that page is only served with authenticated login. Not what I want, but *sigh* - it does solve the problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. I do it that way as well. Me too... for require and include also. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote: On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. I do it that way as well. Me too... for require and include also. Actually, I crossed mental threads there. I do echo without parenthesis but use them on require and include. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
At 8:41 AM -0400 5/15/09, Robert Cummings wrote: On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote: On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. I do it that way as well. Me too... for require and include also. Actually, I crossed mental threads there. I do echo without parenthesis but use them on require and include. Rob et al: As Ron knows, both include() and echo() are language constructs and not functions. As such, parentheses are not needed around their arguments. However, for sake of readability (mine) and consistency in style (again mine) I use parentheses for both. I would fine it disturbing to use parentheses for one and not the other. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
On Fri, May 15, 2009 at 9:38 AM, tedd tedd.sperl...@gmail.com wrote: At 8:41 AM -0400 5/15/09, Robert Cummings wrote: On Fri, 2009-05-15 at 05:42 -0400, Robert Cummings wrote: On Thu, 2009-05-14 at 17:24 -0700, Michael A. Peters wrote: tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. I do it that way as well. Me too... for require and include also. Actually, I crossed mental threads there. I do echo without parenthesis but use them on require and include. Rob et al: As Ron knows, both include() and echo() are language constructs and not functions. As such, parentheses are not needed around their arguments. However, for sake of readability (mine) and consistency in style (again mine) I use parentheses for both. I would fine it disturbing to use parentheses for one and not the other. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php But I always thought you were a bit distubed, tedd... i am disturbed too, since i do the same thing ;-) -- Bastien Cat, the other other white meat
[PHP] php html integration
I'm a bit fuzzy on the relationship between the ? ? and the HTML code. Where should the php code be placed in a page so that execution is carried out smoothly? So far, my coding has managed to avoid horrendous snags; but as I delve deeper into the quagmire of coding, I would like to clear the fog before me. Perhaps I have been fortunate up to this point... :-) -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php html integration
PJ wrote: I'm a bit fuzzy on the relationship between the ? ? and the HTML code. Where should the php code be placed in a page so that execution is carried out smoothly? So far, my coding has managed to avoid horrendous snags; but as I delve deeper into the quagmire of coding, I would like to clear the fog before me. Perhaps I have been fortunate up to this point... :-) Well, you place the php code wherever you want it executed. The file is parsed line by line top to bottom, so if you have some html for an image and you want the php to be executed before the image, then you must place it before the image and vice versa. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
At 2:35 PM -0400 5/14/09, PJ wrote: I'm a bit fuzzy on the relationship between the ? ? and the HTML code. Where should the php code be placed in a page so that execution is carried out smoothly? So far, my coding has managed to avoid horrendous snags; but as I delve deeper into the quagmire of coding, I would like to clear the fog before me. Perhaps I have been fortunate up to this point... :-) PJ: First, do not use ? ? -- that's a short tag and it has been depreciated and will not work with xml. Second, use ?php ? instead. Third, place the php code anywhere you want within the html document (top, bottom, middle, and any where). It makes no difference (other than readability) -- all of it will be executed before the browser see's anything. Fourth, if you want php to print something along with (inside) the html, simply echo() it, such as: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
On Thu, May 14, 2009 at 04:19:57PM -0400, tedd wrote: snip Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. Ohmygosh! I didn't realize Tedd was one of those using parentheses with an echo command guys. I'm sooo disappointed! Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. I do it that way as well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML pages are faster then php?
hi, as far as I know (at least I was told so) html page will download faster then the same page made with php getting the same info from mysql, right? let's pretend we are building php/mysq based website of one football team. there are pages of every player, about the team, games etc. in admin area there is form to enter player's data: first name, last name, DOB, place of birth, him number (jersey), previous teams, education,... we submit data and they are stored in database. and we just did for john doe, (id=12345), born on 1986-10-02 in Paris, TX (do you remember nastasia kinski? :-)) on front end there is list of players and you click on john doe's name and the page will show submitted data. what if we, together with storing john doe data into mysql, create html page 12345.html with all his data. and actually, when visitor clicks on his name on the list of players it will not open player.php?id=12345 then 12345.html? this page will download faster, right? downside, depending of type of the website, it could be thousands and thousands of pages, but still...? to edit john doe page, the administrator (in admin area) will pull the data from mysql, do the changes and submit new ones to mysql and overwrite 12345.html page. now, what's bad with this structure? what am I thinking wrong? thanks ll
Re: [PHP] HTML pages are faster then php?
On Wed, 2009-01-14 at 14:34 -0800, Lamp Lists wrote: hi, as far as I know (at least I was told so) html page will download faster then the same page made with php getting the same info from mysql, right? let's pretend we are building php/mysq based website of one football team. there are pages of every player, about the team, games etc. in admin area there is form to enter player's data: first name, last name, DOB, place of birth, him number (jersey), previous teams, education,... we submit data and they are stored in database. and we just did for john doe, (id=12345), born on 1986-10-02 in Paris, TX (do you remember nastasia kinski? :-)) on front end there is list of players and you click on john doe's name and the page will show submitted data. what if we, together with storing john doe data into mysql, create html page 12345.html with all his data. and actually, when visitor clicks on his name on the list of players it will not open player.php?id=12345 then 12345.html? this page will download faster, right? downside, depending of type of the website, it could be thousands and thousands of pages, but still...? to edit john doe page, the administrator (in admin area) will pull the data from mysql, do the changes and submit new ones to mysql and overwrite 12345.html page. now, what's bad with this structure? what am I thinking wrong? thanks ll I've seen CMS's do this kind of thing before, and really you only have an advantage if you are getting lots and lots (think many thousands) of visitors a day. The overhead isn't all that large and the user won't even notice it. The advantage to having the site done only in PHP/MySQL is that should you decide to add elements to the site in the future, with a CMS driven site it's much easier than having to edit the part of the CMS that is outputting the HTML files and then making it run through an re-create each and every page, which will be very slow each time you have to do it. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML pages are faster then php?
From: Ashley Sheridan a...@ashleysheridan.co.uk To: Lamp Lists lamp.li...@yahoo.com Cc: php-general@lists.php.net Sent: Wednesday, January 14, 2009 4:47:28 PM Subject: Re: [PHP] HTML pages are faster then php? On Wed, 2009-01-14 at 14:34 -0800, Lamp Lists wrote: hi, as far as I know (at least I was told so) html page will download faster then the same page made with php getting the same info from mysql, right? let's pretend we are building php/mysq based website of one football team. there are pages of every player, about the team, games etc. in admin area there is form to enter player's data: first name, last name, DOB, place of birth, him number (jersey), previous teams, education,... we submit data and they are stored in database. and we just did for john doe, (id=12345), born on 1986-10-02 in Paris, TX (do you remember nastasia kinski? :-)) on front end there is list of players and you click on john doe's name and the page will show submitted data. what if we, together with storing john doe data into mysql, create html page 12345.html with all his data. and actually, when visitor clicks on his name on the list of players it will not open player.php?id=12345 then 12345.html? this page will download faster, right? downside, depending of type of the website, it could be thousands and thousands of pages, but still...? to edit john doe page, the administrator (in admin area) will pull the data from mysql, do the changes and submit new ones to mysql and overwrite 12345.html page. now, what's bad with this structure? what am I thinking wrong? thanks ll I've seen CMS's do this kind of thing before, and really you only have an advantage if you are getting lots and lots (think many thousands) of visitors a day. The overhead isn't all that large and the user won't even notice it. The advantage to having the site done only in PHP/MySQL is that should you decide to add elements to the site in the future, with a CMS driven site it's much easier than having to edit the part of the CMS that is outputting the HTML files and then making it run through an re-create each and every page, which will be very slow each time you have to do it. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php right. I forgot about banners, advertising, and other stuff around main data. these will be static too... yup... stupid idea... :-)
[PHP] [HTML MAIL FORM] - Body text not coming through
Can someone spot what I'm doing wrong here? Must have something to do with headers maybe? The attached picture comes through but, no text. Here's the headers that do come through. Thanks for any help. Mail is such a pain. Received: (qmail 13640 invoked by uid 48); 19 Jul 2008 17:01:10 -0700 Date: 19 Jul 2008 17:01:10 -0700 Message-ID: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: From: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary===Multipart_Boundary_x8588974b51cbb9c326958df4c2f8b218x $fileatt = test-send.jpg; // Path to the file $fileatt_type = application/octet-stream; // File Type $fileatt_name = picture.jpg; // Filename that will be used for the file as the attachment $headers = From: .$_REQUEST['first_name']. .$_REQUEST['from'].; $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $semi_rand = md5(time()); $mime_boundary = ==Multipart_Boundary_x{$semi_rand}x; $headers .= \nMIME-Version: 1.0\n . Content-Type: multipart/mixed;\n . boundary=\--{$mime_boundary}\; $body .= Text that should show up but, I'm a noob.\n . --{$mime_boundary}\n . Content-Type:text/html; charset=\iso-8859-1\\n . Content-Transfer-Encoding: 7bit\n\n . $body . \n\n; $data = chunk_split(base64_encode($data)); $body .= --{$mime_boundary}\n . Content-Type: {$fileatt_type};\n . name=\{$fileatt_name}\\n . //Content-Disposition: attachment;\n . // filename=\{$fileatt_name}\\n . Content-Transfer-Encoding: base64\n\n . $data . \n\n . --{$mime_boundary}--\n; @mail($toEmail, $subject, $body, $headers); echo sent=OK;
[PHP] HTML 5
This may be of interest (HTML 5 diffences to HTML 4 overview): http://www.w3.org/TR/2008/WD-html5-diff-20080610/ -- Richard Heyes Employ me: http://www.phpguru.org/cv ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML 5
В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): This may be of interest (HTML 5 diffences to HTML 4 overview): what about xHTML? html died few years ago and i thought is was official.. //sorry for my english -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: If there were a school for, say, sheet metal workers, that after three years left its graduates as unprepared for their careers as does law school, it would be closed down in a minute, and no doubt by lawyers. -- Michael Levin, The Socratic Method [fortune]
Re: [PHP] newbie with php/HTML/HTTP question
On Sun, Apr 27, 2008 at 5:44 PM, Rod Clay [EMAIL PROTECTED] wrote: I've written my php script to accept either: 1) url parameters, when first invoked (so in this case I'm getting variables out of the $_GET global array), but then I create a form with method=PUT and, when this form is submitted and comes back into this same php script, I'm looking for 2) variables in the $_PUT global array However, I tested this just now and, for some reason I can't fathom, though the form I create has method=PUT, when it is submitted and comes back to my php script, $_SERVER['REQUEST_METHOD'] still contains GET. Am I missing something fairly obvious here (quite possible!!)? Once my php script is invoked with parameters in the url (i.e., implicit GET method), am I not able to create a form with method=PUT and have this form come back into my php script with values in the $_PUT global array?? Thanks for any help anyone can give me! I'm stumped! Rod Clay [EMAIL PROTECTED] First off, I don't think browsers support sending form data via PUT (unless you use the XmlHTTPRequest calls usually used for AJAX requests), so regardless of whether you specify method=put in your form tag, the request is still sent via GET. I suspect that basically the browsers say that if the attribute equals post then send via POST; otherwise send via GET. As I understand it, the PUT method is for sending a document to be stored at the requested URI. As such, a PHP script couldn't really be handling a PUT request because if the URI for the script exists, the content in the PUT request should replace the content of the URI. (I guess technically you might be able to swing it through something with mod_rewrite where a PHP script could handle the logic of storing (PUT) or retrieving (GET) the document.) http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6 The fundamental difference between the POST and PUT requests is reflected in the different meaning of the Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. That resource might be a data-accepting process, a gateway to some other protocol, or a separate entity that accepts annotations. In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what URI is intended and the server MUST NOT attempt to apply the request to some other resource. If the server desires that the request be applied to a different URI, it MUST send a 301 (Moved Permanently) response; the user agent MAY then make its own decision regarding whether or not to redirect the request. Secondly, there isn't a $_PUT superglobal in PHP. http://us3.php.net/manual/en/reserved.variables.php Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] newbie with php/HTML question
I've written my php script to accept either: 1) url parameters, when first invoked (so in this case I'm getting variables out of the $_GET global array), but then I create a form with method=PUT and, when this form is submitted and comes back into this same php script, I'm looking for 2) variables in the $_PUT global array However, I tested this just now and, for some reason I can't fathom, though the form I create has method=PUT, when it is submitted and comes back to my php script, $_SERVER['REQUEST_METHOD'] still contains GET. Am I missing something fairly obvious here (quite possible!)? Once my php script is invoked with parameters in the url (i.e., implicit GET method), am I not able to create a form with method=PUT and have this form come back into my php script with values in the $_PUT global array?? Thanks for any help anyone can give me! I'm stumped! Rod Clay [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie with php/HTML question
On 27 Apr 2008, at 22:40, Rod Clay wrote: I've written my php script to accept either: 1) url parameters, when first invoked (so in this case I'm getting variables out of the $_GET global array), but then I create a form with method=PUT and, when this form is submitted and comes back into this same php script, I'm looking for 2) variables in the $_PUT global array However, I tested this just now and, for some reason I can't fathom, though the form I create has method=PUT, when it is submitted and comes back to my php script, $_SERVER['REQUEST_METHOD'] still contains GET. Am I missing something fairly obvious here (quite possible!)? Once my php script is invoked with parameters in the url (i.e., implicit GET method), am I not able to create a form with method=PUT and have this form come back into my php script with values in the $_PUT global array?? Thanks for any help anyone can give me! I'm stumped! You want POST not PUT. Nearly all browsers don't currently support PUT requests. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] newbie with php/HTML/HTTP question
I've written my php script to accept either: 1) url parameters, when first invoked (so in this case I'm getting variables out of the $_GET global array), but then I create a form with method=PUT and, when this form is submitted and comes back into this same php script, I'm looking for 2) variables in the $_PUT global array However, I tested this just now and, for some reason I can't fathom, though the form I create has method=PUT, when it is submitted and comes back to my php script, $_SERVER['REQUEST_METHOD'] still contains GET. Am I missing something fairly obvious here (quite possible!!)? Once my php script is invoked with parameters in the url (i.e., implicit GET method), am I not able to create a form with method=PUT and have this form come back into my php script with values in the $_PUT global array?? Thanks for any help anyone can give me! I'm stumped! Rod Clay [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie with php/HTML question
Wow, thanks. I can't believe I made this mistake. This group is sooo helpful. I could probably have looked at this another 10 hours and not seen this. Thanks again. Also, I'd like to apologize for the double post. I posted the first with an email address different from the one I subscribed to the list with and I thought it wouldn't be accepted, so posted the second with the correct email address. Surprisingly, they both posted! Not sure how this happened. Stut wrote: On 27 Apr 2008, at 22:40, Rod Clay wrote: I've written my php script to accept either: 1) url parameters, when first invoked (so in this case I'm getting variables out of the $_GET global array), but then I create a form with method=PUT and, when this form is submitted and comes back into this same php script, I'm looking for 2) variables in the $_PUT global array However, I tested this just now and, for some reason I can't fathom, though the form I create has method=PUT, when it is submitted and comes back to my php script, $_SERVER['REQUEST_METHOD'] still contains GET. Am I missing something fairly obvious here (quite possible!)? Once my php script is invoked with parameters in the url (i.e., implicit GET method), am I not able to create a form with method=PUT and have this form come back into my php script with values in the $_PUT global array?? Thanks for any help anyone can give me! I'm stumped! You want POST not PUT. Nearly all browsers don't currently support PUT requests. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML form upload works, CURL fails when uploading file from c:
PHP 5.2.1 on Apache/Linux. Client is Firefox and IE7 on Windows XP. Uploading C:\boot.ini works great from an HTML type=file form element but fails using what should be the equivalent: curl_setopt($ch,CURLOPT_POSTFIELDS,array('peru'='@C:/boot.ini')); CURL error is failed creating formpost data. Same CURL works when the test file resides on the PHP server: curl_setopt($ch,CURLOPT_POSTFIELDS,array('peru'='@/home/user/boot.ini')); so problem seems to be in the '@C:/boot.ini' filespec. Substituting '@C:\boot.ini' or '@C:\\boot.ini' doesn't help. What am I doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html to doc and pdf ??
http://php.net/pdf I'm betting there is a PEAR module to write Word docs. Or you could use COM objects, if you are running PHP on a Windows box that has Word installed. On Sat, December 22, 2007 9:55 pm, Me2resh Lists wrote: Dear All, after suffering with asp.net, i finally convinced the company to turn the application we are using to PHP but my concern is, what is the easiest and best way to convert html that is generated from mysql databse to microsoft word and pdf files the application will run on a linux server can anyone help please any help would be appreciated thanks in advance,. Regards, Me2resh -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html to doc and pdf ??
PDF is easy, there are many packages and classes that can convert the html to PDFs. A quick google will give you lots of results like www.fpdf.org http://www.digitaljunkies.ca/dompdf/ etc word docs will be harder to create bastien _ Discover new ways to stay in touch with Windows Live! Visit the City @ Live today! http://getyourliveid.ca/?icid=LIVEIDENCA006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html to doc and pdf ??
Dear All, after suffering with asp.net, i finally convinced the company to turn the application we are using to PHP but my concern is, what is the easiest and best way to convert html that is generated from mysql databse to microsoft word and pdf files the application will run on a linux server can anyone help please any help would be appreciated thanks in advance,. Regards, Me2resh
[PHP] HTML parser (maybe even HTML to BBCode)
Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much, still need to make a HTML to BBCode parser myself.
Re: [PHP] HTML parser (maybe even HTML to BBCode)
On Dec 20, 2007 10:30 AM, Arvids Godjuks [EMAIL PROTECTED] wrote: Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much, still need to make a HTML to BBCode parser myself. I'm not sure if the PECL BBCode module will help you or not (I'm not sure if it reverses the code), but it may. http://pecl.php.net/package/bbcode -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php