php-general Digest 11 Mar 2010 15:27:47 -0000 Issue 6633

2010-03-11 Thread php-general-digest-help
php-general Digest 11 Mar 2010 15:27:47 - Issue 6633 Topics (messages 302688 through 302701): Re: Array Search Not Working? 302688 by: clancy_1.cybec.com.au Re: Array Search Problem 302689 by: Rene Veerman 302696 by: Alice Wei Re: Execution order of PHP

Re: [PHP] php string syntax question with html

2010-03-11 Thread Ashley Sheridan
On Thu, 2010-03-11 at 08:03 +0100, Rene Veerman wrote: $var = 'bla'.$var2.'doh'.$var3['index'].'argh'.$var4[$var4index]; is so much more readable in any editor that does syntax highlighting, and parses quicker too. On Thu, Mar 11, 2010 at 1:15 AM, David Mehler dave.meh...@gmail.com wrote:

[PHP] changing values deep in an array by reference, with some index vars in array..

2010-03-11 Thread Rene Veerman
Hi.. I've got a db-insert command array that's several levels deep.. Let's abstract this as: $wm[$idx1][$idx2][$idx3][..etc] //$WorkMemory Several of my helper functions need to work on the original, top-call_level $wm. So i pass it as $wm, and have the helper function declarations accept it as

Re: [PHP] php string syntax question with html

2010-03-11 Thread Rene Veerman
Ah, ok.. Turns out mine does too ;) So for light apps, it can be considered a coder's preference then.. On Thu, Mar 11, 2010 at 9:16 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: My editor highlights those strings even without me having to keep breaking out with concatenation Rene

[PHP] Re: changing values deep in an array by reference, with some index vars in array..

2010-03-11 Thread Rene Veerman
ah, comments for http://www.php.net/manual/en/language.references.return.php show: - php at thunder-2000 dot com 02-Feb-2007 10:31 If you want to get a part of an array to manipulate, you can use this function function

RE: [PHP] Array Search Problem

2010-03-11 Thread Alice Wei
Hi, At the time when I am writing this, looks like I already got the functions I needed. It turned out that I had to use some array_combine, sorting the items by keys instead of values as well as using array_keys to get the values I needed. Thanks for pointing me towards the right

Re: [PHP] Division by 0

2010-03-11 Thread Jochem Maas
Op 3/10/10 11:39 PM, Daniel Egeberg schreef: On Wed, Mar 10, 2010 at 23:44, Dmitry Ruban dmi...@ruban.biz wrote: Hi Jochem, Jochem Maas wrote: Op 3/10/10 6:23 PM, Joseph Thayne schreef: Looks to me like you are closing your form before you put anything in it. Therefore, the loan_amount

Re: [PHP] Execution order of PHP

2010-03-11 Thread Auke van Slooten
Jochem Maas wrote: Op 3/10/10 1:29 PM, Auke van Slooten schreef: Hi, In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client-system-multiCall( $client-methodOne(), $client-methodTwo() ); but who cares. the code is full of magic, which

Re: [PHP] Division by 0

2010-03-11 Thread Gary
I love this place, thank you to everyone that posted, I will make changes to make it safer. Thanks again to everyone. gary Jochem Maas joc...@iamjochem.com wrote in message news:4b98de7e.8020...@iamjochem.com... Op 3/10/10 11:39 PM, Daniel Egeberg schreef: On Wed, Mar 10, 2010 at 23:44,

RE: [PHP] Division by 0

2010-03-11 Thread Mike Roberts
I have tried and tried, countless times to be removed from this list... still when I go to my deleted items I can see that emails leak through. If there is an administrator who can simply delete me ( simply because I can not seem to do this correctly) I would greatly appreciate it. Thank You!

[PHP] Drawing Images Without Writing To a File

2010-03-11 Thread Floyd Resler
I want to draw tabs in a tab bar without having to actually write the images to a file. Is it possible to generate the image and send the data back and make the browser think it's loading an image file? I know this can be done by sending the proper headers back for an entire page, but I just

Re: [PHP] Drawing Images Without Writing To a File

2010-03-11 Thread Ashley Sheridan
On Thu, 2010-03-11 at 10:27 -0500, Floyd Resler wrote: I want to draw tabs in a tab bar without having to actually write the images to a file. Is it possible to generate the image and send the data back and make the browser think it's loading an image file? I know this can be done by

Re: [PHP] Drawing Images Without Writing To a File

2010-03-11 Thread Ken Sande
Floyd Resler wrote: I want to draw tabs in a tab bar without having to actually write the images to a file. Is it possible to generate the image and send the data back and make the browser think it's loading an image file? I know this can be done by sending the proper headers back for an

Re: [PHP] Drawing Images Without Writing To a File

2010-03-11 Thread Rene Veerman
sure.. have a seperate php script output the image you want (after doing a header() call to set the mime type to an image; google php header image), and call that on the relevant page via img src='http://yourserver.com/project/imageScript.php?p1=ap2=b;.. but ehm, image creation is bound to be a

RE: [PHP] Drawing Images Without Writing To a File

2010-03-11 Thread David Murphy
Also you should think about writing those files a memcache or something. That way the image can expire but you're not wasting a lot of cpu cycles, aka 500 hits to the site at the same time would be very intensive, but if someone hit the site 10 minutes ago with a 700 ttl, the would load

Re: [PHP] Drawing Images Without Writing To a File

2010-03-11 Thread Floyd Resler
Ken, That's exactly what I want and it works beautifully! I wish I had asked this question a long time ago since, in the past, I have been creating the files and wind up with a bunch of image files hanging around. When building this new site I thought there must be a better way!

[PHP] outlook calendar entry on the fly

2010-03-11 Thread Jack
Does anyone have any reference to some php code which would allow me to have a person go to a website, pick an appointment time and date and then create a clickable link which could populate outlook with the appointment. I believe this is an .ics file which outlook needs/reads. Thanks!

RE: [PHP] outlook calendar entry on the fly

2010-03-11 Thread David Murphy
http://www.phpclasses.org/browse/package/873.html Should do the trick for you. -Original Message- From: Jack [mailto:jacklistm...@gmail.com] Sent: Thursday, March 11, 2010 12:24 PM To: php-general@lists.php.net Subject: [PHP] outlook calendar entry on the fly Does anyone have any

Re: [PHP] Division by 0

2010-03-11 Thread Jochem Maas
Op 3/11/10 2:44 PM, Mike Roberts schreef: I have tried and tried, countless times to be removed from this list... still when I go to my deleted items I can see that emails leak through. If there is an administrator who can simply delete me ( simply because I can not seem to do this correctly)

[PHP] DOMElement: td vs. th

2010-03-11 Thread Andy Theuninck
I'm trying to parse a string containing an HTML table using the builtin DOM classes and running into an odd problem. Here's what I'm doing: $dom = new DOMDocument(); $dom-loadHTML($str); $tables = $dom-getElementsByTagName(table); $rows = $tables-item(0)-getElementsByTagName('tr'); foreach($rows

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Rene Veerman
hmm lame bug... but you can add a classname to the ths and check for that?.. On Thu, Mar 11, 2010 at 9:34 PM, Andy Theuninck gohan...@gmail.com wrote: I'm trying to parse a string containing an HTML table using the builtin DOM classes and running into an odd problem. Here's what I'm doing:

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Andy Theuninck
I could could, but that would kind of defeat the point of the project (I'm trying to capture a bunch of existing HTML reports via output buffering and transform the tables into proper XLS. Tweaking every single report is exactly what I'm trying to avoid). On Thu, Mar 11, 2010 at 2:45 PM, Rene

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Rene Veerman
function readyForDOM_report($originalReportAsText) { return str_replace ('th', 'th class=transportTH', $originalReportAsText); } $dom = new DOMDocument(); $dom-loadHTML(readyForDOM_report($str)); $tables = $dom-getElementsByTagName(table); $rows = $tables-item(0)-getElementsByTagName('tr');

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Rene Veerman
So in other words; it's the library that you fix with wrapper functions, not the reports (outside the scope of using the library). On Thu, Mar 11, 2010 at 9:59 PM, Rene Veerman rene7...@gmail.com wrote: function readyForDOM_report($originalReportAsText) {  return str_replace ('th', 'th

[PHP] SSL and multiple host names

2010-03-11 Thread Skip Evans
Hey all, Just wanted to let you know what I find out about this and how I solved the problem. First, name based SSL is, as one person told me, only good for one IP address in an Apache installation. I'll let Apache explain it themselves because they are better at it than I am. The reason

Re: [PHP] DOMElement: td vs. th

2010-03-11 Thread Andy Theuninck
Gotcha, wasn't thinking straight. Turns out it doesn't really have to be a legal-HTML attribute anyway, so I can just do: str_replace('th','th fakeattr=blah ',$str) On Thu, Mar 11, 2010 at 3:01 PM, Rene Veerman rene7...@gmail.com wrote: So in other words; it's the library that you fix with

[PHP] $_GET is Mangling Base64 value

2010-03-11 Thread George Langley
Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6) Am receiving a Base64-encoded value: theurl.com/index.php?message=x  and retrieving it with $_GET: echo $_GET[message]; x is a Japanese phrase, that has been encoded into

[PHP] PHP backup in Minnesota

2010-03-11 Thread Ken Kixmoeller
Hey, folks --- - I have a new system going live shortly. Unfortunately, through some client delays (and mine, too, I suppose), we are butting up to a vacation I have planned. My client would like to have a *local* resource PHP person, in case, well I don't know, the whole system starts

[PHP] Re: PHP backup in Minnesota

2010-03-11 Thread Manuel Lemos
Hello, on 03/11/2010 07:05 PM Ken Kixmoeller said the following: Hey, folks --- - I have a new system going live shortly. Unfortunately, through some client delays (and mine, too, I suppose), we are butting up to a vacation I have planned. My client would like to have a *local*

[PHP] Re: PHP backup in Minnesota

2010-03-11 Thread Ken Kixmoeller
Manuel Lemos wrote: Hello, You may want to try posting an offer here to increase the chances of finding somebody. http://www.phpclasses.org/jobs/ You can also look some of the available people on the map of your region: http://www.phpclasses.org/professionals/country/us/ Thanks -- PHP

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Michael Shadle
On Thu, Mar 11, 2010 at 1:57 PM, George Langley george.lang...@shaw.ca wrote: x is a Japanese phrase, that has been encoded into Base64. So is using the + symbol: ...OODq+OCou... but my $_GET is replacing the + with a space: ...OODq OCou... thus the base64_decode() is failing

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Ashley Sheridan
On Thu, 2010-03-11 at 14:57 -0700, George Langley wrote: Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6) Am receiving a Base64-encoded value: theurl.com/index.php?message=x and retrieving it with $_GET: echo

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Adam Richardson
On Thu, Mar 11, 2010 at 4:57 PM, George Langley george.lang...@shaw.cawrote: Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6) Am receiving a Base64-encoded value: theurl.com/index.php?message=x and retrieving it with

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Daniel Egeberg
On Thu, Mar 11, 2010 at 22:57, George Langley george.lang...@shaw.ca wrote:        Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6)        Am receiving a Base64-encoded value: theurl.com/index.php?message=x  and retrieving it with

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Daniel Egeberg
On Thu, Mar 11, 2010 at 23:16, Daniel Egeberg degeb...@php.net wrote: On Thu, Mar 11, 2010 at 22:57, George Langley george.lang...@shaw.ca wrote:        Hi all. Is there an issue with $_GET not handling a Base64-encoded value correctly? (PHP is 5.1.6)        Am receiving a Base64-encoded

[PHP] Robust PDF editing on the fly

2010-03-11 Thread Donovan Brooke
Hello!, Longtime member, rare poster here. I am browsing around right now regarding the subject line, and have looked at the HTML_toPDF project http://www.rustyparts.com/pdf.php that also includes a PDFEncryptor system in it.. but I thought I'd post to the list to see if anyone has any

Re: [PHP] PHP backup in Minnesota

2010-03-11 Thread Jochem Maas
Op 3/11/10 10:05 PM, Ken Kixmoeller schreef: Hey, folks --- - -- Session-based, no cookies. sessions are cookie based. unless your passing the session id around via a URL parameter, which is a no-no. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Robust PDF editing on the fly

2010-03-11 Thread Ashley Sheridan
On Thu, 2010-03-11 at 16:32 -0600, Donovan Brooke wrote: Hello!, Longtime member, rare poster here. I am browsing around right now regarding the subject line, and have looked at the HTML_toPDF project http://www.rustyparts.com/pdf.php that also includes a PDFEncryptor system in

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread George Langley
Hi again. Thanks for all the info! Not sure I'd agree that GET should just assume it was URLencoded, but hey - who am I to argue?  :-{)] As mentioned, this is eventually buried into a Joomla! site's login functions (displays any errors). So not sure I'd have access to the

Re: [PHP] $_GET is Mangling Base64 value

2010-03-11 Thread Ashley Sheridan
On Thu, 2010-03-11 at 17:34 -0700, George Langley wrote: Hi again. Thanks for all the info! Not sure I'd agree that GET should just assume it was URLencoded, but hey - who am I to argue? :-{)] As mentioned, this is eventually buried into a Joomla! site's login functions

[PHP] PHP MySQL Insert Statements

2010-03-11 Thread Martine Osias
Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Thank you. Martine -- PHP

Re: [PHP] PHP MySQL Insert Statements

2010-03-11 Thread Bruno Fajardo
2010/3/11 Martine Osias webi...@gmail.com: Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from

Re: [PHP] PHP MySQL Insert Statements

2010-03-11 Thread Stephen
Martine Osias wrote: My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Most likely syntax

Re: [PHP] PHP backup in Minnesota

2010-03-11 Thread Ken Kixmoeller
Jochem Maas wrote: Op 3/11/10 10:05 PM, Ken Kixmoeller schreef: Hey, folks --- - -- Session-based, no cookies. sessions are cookie based. unless your passing the session id around via a URL parameter, which is a no-no. Ja, bestimmt. I should have said no persistent cookies -- PHP

Re: [PHP] Robust PDF editing on the fly

2010-03-11 Thread Donovan Brooke
Ashley Sheridan wrote: [snip] I don't think PHP really has anything good for higher level editing of PDF's. Simple stuff only really. You could maybe look at doing some command line stuff on a system using a later version of OpenOffice which has just now got some very good PDF editing features.

Re: [PHP] PHP MySQL Insert Statements

2010-03-11 Thread Kevin Kinsey
Martine Osias wrote: Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Thank you.

[PHP] Doing dynamic routing for an office

2010-03-11 Thread Ian
Hi, I have had a weird request as a project and that is to build a system where the clients can put down their office plans into a system and based on where you are in the buliding (either via defined kiosks or mobile dropdown filters) it will print out directions on how to get somewhere within

Re: [PHP] Doing dynamic routing for an office

2010-03-11 Thread Per Jessen
Ian wrote: Hi, I have had a weird request as a project and that is to build a system where the clients can put down their office plans into a system and based on where you are in the buliding (either via defined kiosks or mobile dropdown filters) it will print out directions on how to get

[PHP] mysqli procedural calls and manual entries ?

2010-03-11 Thread Per Jessen
I run a local mirror of the PHP manual, and I most often go straight to the Search for box to look up the format of a function. With the mysqli functions, I've found than many of them simply aren't available that way. E.g. mysqli_connect() - Sorry, but the function mysqli_connect is not in the