Re: [PHP] Foreach and mydql_query problem

2013-07-22 Thread Jim Lucas
+= $rad['adr_vekt_kg']; $total_antall_kolli += $rad['antall_kolli_stk']; } ? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] query order issue

2013-07-21 Thread Jim Lucas
On 7/20/2013 9:21 AM, dealTek wrote: Hi all, I have a page that starts with several mysql sql query searches and displays data below... then I added a form (with hidden line do-update value UPDATE) on the same page with action to same page... then above other sql queries - I put... if

Re: [PHP] Error checking ON

2013-07-17 Thread Jim Lucas
be executed. Therefor they will never do any good. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reseting the auto-increment number in a MySQL database.

2013-06-26 Thread Jim Lucas
is turned on, you might be able to rummage through the logs and see what happened and when it happened. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] undef func - any more clues ?

2013-05-14 Thread Jim Lucas
- Original Message - From: Jim Lucas li...@cmsws.com To: georg georg.chamb...@telia.com Cc: a...@ashleysheridan.co.uk; php-general@lists.php.net Sent: Tuesday, May 14, 2013 3:25 AM Subject: Re: [PHP] undef func - any more clues ? On 05/12/2013 10:34 AM, georg wrote: Hi Im not really

Re: [PHP] undef func - any more clues ?

2013-05-13 Thread Jim Lucas
perform them as I did and you should be working when you are done. Let us know if you need anything further. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Updated PHP breaks processing-intense Procedure

2013-04-24 Thread Jim Lucas
). The appearance is wrong; it is still broken. No errors are being thrown. We are baffled. Ken If you have the Suhosin patch installed, it also introduces other limits to GET and POST variable counts within PHP. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General

Re: [PHP] Updated PHP breaks processing-intense Procedure

2013-04-24 Thread Jim Lucas
:; Controls if suhosin's ini directives are changeable per directory php.ini:;suhosin.perdir = 0 Ken On Wed, Apr 24, 2013 at 5:06 PM, Jim Lucas li...@cmsws.com wrote: On 04/24/2013 02:40 PM, Ken Kixmoeller wrote: Thanks so much. Yes, we found that because PHP threw an error that said

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Jim Lucas
On 3/14/2013 4:05 PM, Matijn Woudt wrote: On Thu, Mar 14, 2013 at 11:44 PM, Jim Lucas li...@cmsws.com wrote: On 03/14/2013 11:50 AM, Samuel Lopes Grigolato wrote: Something like if (is_numeric($var) $var == floor($var)) will do the trick. I don't know if there's a better (more elegant) way

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Jim Lucas
if a variable, that is a string, could be converted to an integer. Not if a variable is an integer. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Jim Lucas
always used this: if ( $val == (int)$val ) { http://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Joining fixed text to a SUBJECT variable

2013-03-02 Thread Jim Lucas
\ #language.types.string.syntax.heredoc -- Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Stupid question

2013-02-26 Thread Jim Lucas
+= $_pdetail-_subTotal; $_counter++; } } I'm getting: Call to undefined method MDB2_Error::fetchrow() anyone have any ideas? Can I not pass a database handle to a function? Thanks, Curtis -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http

Re: [PHP] Arrays

2013-02-25 Thread Jim Lucas
) ) { echo $item['price']; } else { echo 'Item does not have a price set'; } } Resources: http://php.net/foreach http://php.net/array_key_exists -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] stripped \n

2013-02-20 Thread Jim Lucas
/forms.html#text-%28type=text%29-state-and-search-state-%28type=search%29 Does that explain why your example doesn't work? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php5.3 exec() : output truncate

2013-01-30 Thread Jim Lucas
On 01/30/2013 10:14 AM, patrick ficheux wrote: Hi, I want to get the list of running processes. also, I call exec() with ps -A What user is your httpd process running as? run this from your cli: ps aux | grep httpd and show us the output -- Jim Lucas http://www.cmsws.com/ http

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-03 Thread Jim Lucas
/language.operators.bitwise.php -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date problem

2013-01-03 Thread Jim Lucas
On 01/03/2013 01:57 PM, Marc Fromm wrote: $jes = 01/03/2012; # php -r echo 01/03/2012; 0.00016567263088138 You might want to put quotes around that value so it is actually a string and does not get evaluated. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-03 Thread Jim Lucas
On 01/03/2013 11:43 AM, Andreas Perstinger wrote: is the bitwise and operator. So is a single pipe. http://php.net/manual/en/language.operators.bitwise.php -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-02 Thread Jim Lucas
would want to do this? Won't this type of condition/test always return true? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Boolean type forced on string assignment inside if statement

2013-01-02 Thread Jim Lucas
would then have to ask, how often do you think a string will be 0? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Nested loopa

2012-12-25 Thread Jim Lucas
On 12/25/2012 4:21 PM, Ken Arck wrote: So I cannot do nested do loops in php? ?php $a = 0 ; $b = 0 ; do { echo $a\n ; do { echo $b\n ; $b++ }while($b =10) ; $a++; }while($a = 20) ; ? You have a typo. Line 8 What are you expecting as output? -- Jim Lucas

Re: [PHP] storing searching docs

2012-12-13 Thread Jim Lucas
for the convert.php script as well. http://www.cmsws.com/examples/applications/word2_/convert.phps I have thought about extending this even further to figure out the layout and test formatting. But it hasn't gotten much attention for quite some time now. Hope it helps. -- Jim Lucas http

Re: [PHP] Php application with session used in a cluster

2012-12-12 Thread Jim Lucas
system used by default. Thanks. Jan. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to read emails with php

2012-12-04 Thread Jim Lucas
from. Here is a page I wrote a while back that shows you how to do this. http://bendsource.cmsws.com/serverSetup -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://bendsource.cmsws.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] PHP site search broken?

2012-12-04 Thread Jim Lucas
://quillandmouse.com -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDO question

2012-11-28 Thread Jim Lucas
there is NOT. There is a warning on the following page that talks about a possible issue with connections. Might give it a look. http://www.php.net/manual/en/ref.pdo-mysql.connection.php -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] CSV importer tool

2012-11-27 Thread Jim Lucas
it, maybe using AJAX or similar cute techniques? Leandro google for: php csv importer script Reading the first result, it seems it is exactly what you are looking for. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Date comparison going wrong, wrong, wrong

2012-11-20 Thread Jim Lucas
is *the show has ended* which is wrong. A test example is at http://www.lakesidesurrey.co.uk/test.php. You can also me what I am doing wrong? Thanks Terry -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
scripts. See if the problem continues. Maybe at the very end of your customer error handler. If the problem stops showing up, you might want to look at your PHP config to see if anything is setup in the auto_append_file section. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
was injecting code using the auto_append param, then you would not know about it, but it would still cause you issues. And by issuing a die or exit at the end of the code would show if it was your code or something running after all your script has completed. Best, Carol On 11/12/2012 8:09 AM, Jim

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
On 11/12/2012 8:54 AM, Carol Peck wrote: Jim, I just found that the die didn't fix it after all - just ran into it again. So still looking for ideas! thanks, Carol Then it must be something in either your code or the way PHP is doing some garbage collection with the libs you are using.

Re: [PHP] Fwd: PHP Enterprise Bananas

2012-11-06 Thread Jim Lucas
page for the project, maybe it is defunct. Ben I have scripts that get ran via crond and others that run 24/7 as daemons. I have no issues using PHP via the cli. Like Bastien said, you will want to setup better logging and maybe summary emails from cron would be useful too. -- Jim Lucas

Re: [PHP] URGENT! Need help with command line for list all new/modified files within the last 24 hours

2012-10-25 Thread Jim Lucas
/modified files within the last 24 hours. Thanks for any help, LAMP First off, don't hijack someone else's thread for a new topic Secondly, this has nothing to do with PHP Third, if it is Linux, man find and you will find the answer you seek Forth, if it is Windows, I have nothing else to say -- Jim

Re: [PHP] Send php Mail not working in MAMP (non pro version)

2012-10-18 Thread Jim Lucas
: no sendmail in (...) But as root, I get this [root@jim ~]# which sendmail /usr/sbin/sendmail So, make sure your apachephp user can see and execute sendmail -- Jim Lucas Ji Jim, in the mamp php.ini file I had set like the demo to: [mail function] ; For Win32 only. ;SMTP = localhost - these commented

Re: [PHP] Send php Mail not working in MAMP (non pro version)

2012-10-17 Thread Jim Lucas
this [jlucas@jim ~]$ which sendmail /usr/bin/which: no sendmail in (...) But as root, I get this [root@jim ~]# which sendmail /usr/sbin/sendmail So, make sure your apachephp user can see and execute sendmail -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List

Re: [PHP] foreach

2012-10-15 Thread Jim Lucas
the output I get is 1 1 Milk Milk 2.59 2.59 Which is printed to the screen according to how many rows are in the db I belive. So my question is why this behavior? I was expecting something like a while loop. Code please. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP

[PHP] Ok then, here is a test

2012-10-13 Thread Jim Lucas
was it got blocked, but I have enabled all the filtering again, and this is my test email with the full set of filtering enabled. Lets see if the server still gets blocked. I will post the logs if and when it gets blocked. -- Jim Lucas -- PHP General Mailing List (http://www.php.net

Re: [PHP] Ok then, here is a test

2012-10-13 Thread Jim Lucas
On 10/13/2012 10:42 PM, Jim Lucas wrote: On 10/12/2012 11:42 AM, Daniel Brown wrote: Well, as the adage goes, you'll catch more flies with honey than with vinegar. And considering this is the very first message I've ever seen from you, it sounds like either (a) you didn't follow

Re: [PHP] Bounce messages

2012-09-21 Thread Jim Lucas
=blacklist%3a213.123.20.127 This could be the source of your bounce messages. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Bounce messages

2012-09-21 Thread Jim Lucas
...@ashleysheridan.co.uk] Sent: Friday, September 21, 2012 2:56 PM To: Jim Lucas Cc: Lester Caine; php-general@lists.php.net Subject: Re: [PHP] Bounce messages On Fri, 2012-09-21 at 09:56 -0700, Jim Lucas wrote: On 09/21/2012 12:40 AM, Lester Caine wrote: I know that the php list are one

Re: [PHP] about PHP's filter_var function

2012-09-20 Thread Jim Lucas
5.1.6 can slove this work and replace the filter_var function ? Thank you, I'm a new one, so I don't know much about PHP documentation. By the way, The PHP version is required. so I can't upgrade it. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing

Re: [PHP] about PHP's filter_var function

2012-09-20 Thread Jim Lucas
loops maybe... Strange. I must have ran into this issue years ago. I have always performed strict (===) comparisons because I thought PHP would equate negative numbers as false. Learn something new every day... -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP

Re: [PHP] How to limit source IP in PHP

2012-09-14 Thread Jim Lucas
the connection to. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to limit source IP in PHP

2012-09-14 Thread Jim Lucas
added confusion to the thread. Regards, Tonino Which is it that you are talking about? PHP running through Apache or a dedicated PHP script running on its own as a daemon? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] How to limit source IP in PHP

2012-09-13 Thread Jim Lucas
connecting out, that is more of a OS specific option. You will need to find out how to run a php script and have it bind to a given IP (or interface) when it connects to the WWW. Hope this helps. Jim Regards, Tonino -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP

Re: [PHP] How to limit source IP in PHP

2012-09-13 Thread Jim Lucas
On 09/13/2012 12:55 PM, Tonix (Antonio Nati) wrote: Il 13/09/2012 21:41, Jim Lucas ha scritto: On 09/13/2012 12:28 PM, Tonix (Antonio Nati) wrote: You are speaking about incoming connections, I suppose. I'm speaking about connections started from within PHP. Which is a response

Re: [PHP] another Array question

2012-09-10 Thread Jim Lucas
On 9/10/2012 9:41 PM, admin wrote: Hello everyone, I have a very long array. I want to pull all the data from the array from a certain position to a certain position. $myarray = array('0'='me', '1'='you','2'='her','3'='him','4'='them', '5'='us'); Yes I know the array above it small it's

Re: [PHP] PHP to XLS Security Alert issue

2012-08-29 Thread Jim Lucas
, then it complains. May want to check that as well. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: get question

2012-08-27 Thread Jim Lucas
the same results. Sorry Ashley, had to point it out. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
pasting sites around, but that breaks up the continuity of the list archive. No solution, just frustrated This list does allow attachments, but that breaks things too, because they are not shown on archive web sites. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ My

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
and wraps at 80 chars. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
Well, not to talk bad about Gmail (I use it for personal accounts), but I like using a client that I do have some control over what it does to my email. Making sure that it retains my formatting is one of my first requirements. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
, because they are not shown on archive web sites. Wow, I did not know it even allowed attachments. The catch is, they must be txt files. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
a new message arrives. As long as your IMAP client is open and logged into your account, that notification process will take less then a couple seconds. I cannot see how IMAP is slow. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http

Re: [PHP] Cost of redirect and site domain switch? Good Practice/ Bad Practice / Terrible Practice

2012-08-19 Thread Jim Lucas
On 8/17/2012 6:35 PM, Jim Giner wrote: On 8/17/2012 7:16 PM, Jim Lucas wrote: You could simply remove all full domain+path URL links and replace them with absolute path urls only. turn http://www.somedomain.com/path/to/my/webpage.html into /path/to/my/webpage.html This would work

Re: [PHP] OT (maybe not): Drupal vs WordPress

2012-08-19 Thread Jim Lucas
On 8/19/2012 2:39 PM, Michael Shadle wrote: Yes this is going to spawn a religious debate. But joomla sucks. Sorry folks. 1+ -- Jim Lucas http://cmsws.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cost of redirect and site domain switch? Good Practice / Bad Practice / Terrible Practice

2012-08-17 Thread Jim Lucas
://www.somedomain.com/path/to/my/webpage.html into /path/to/my/webpage.html This would work with either domain. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Jim Lucas
have display errors turned on? Are you saving your errors to a log file? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is PHP unsuitable for HTML5 WebSockets?

2012-08-13 Thread Jim Lucas
On 8/12/2012 12:06 PM, BRIAN M. FITZPATRICK wrote: I've looked all over the net and I have been unable to find a concrete answer to this question. I am about to start development on a web application that will need to provide real-time updates of data to user's browsers. WebSockets are ideal

Re: [PHP] PHP session variables

2012-08-09 Thread Jim Lucas
://sperling.com You are relying on PHP's loose typing. This is a poor check. session_id() returns a string, not boolean. You should do this instead. if ( session_id() === '' ) -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ -- PHP General Mailing List (http

Re: [PHP] Too many open files

2012-08-09 Thread Jim Lucas
/grap/close your batch of files? You could replace a call like this: $data = file_get_contents($filename); with this: if ( $fh = fopen($filename, 'r') ) { $data = fread($fh, filesize($filename)); fclose($fh); } This should take care of your issue. Jim Lucas -- PHP General Mailing List

Re: [PHP] Too many open files

2012-08-09 Thread Jim Lucas
read('hello-world2.txt'); echo read('hello-world3.txt'); This way you will close one file before start reading the other one. -- Att, Alan Hoffmeister You top posted AND you didn't send it to the list... Jim 2012/8/10 Jim Lucas li...@cmsws.com: On 8/9/2012 5:01 PM, Al wrote: Getting Too

Re: [PHP] magic getter

2012-07-19 Thread Jim Lucas
created. with this example, you are never using the __get() magic function to retrieve the value of color. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Jim Lucas
checks also report rDNS fails. Any suggestions how I can handle this? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDO Prevent duplicate field names?

2012-07-02 Thread Jim Lucas
, and the SQL was easily fixed. But it woulda been nice to have PHP realize there was a dupe when it was building that array to return to me. You could always do this. SELECT b.*, a.CustID FROM Customer a LEFT JOIN Sales B USING (CustID) WHERE a.CustID = 1234; -- Jim Lucas http://www.cmsws.com/ http

Re: [PHP] How does this code work?

2012-07-02 Thread Jim Lucas
On 7/2/2012 7:15 PM, Robert Williams wrote: I found this code in a user comment in the PHP docs for htmlentities(): ?php function xml_character_encode($string, $trans='') { $trans = (is_array($trans)) ? $trans : get_html_translation_table(HTML_ENTITIES, ENT_QUOTES); foreach ($trans as $k=$v)

Re: [PHP] else if vs switch

2012-06-17 Thread Jim Lucas
On 6/15/2012 3:29 PM, Joshua Kehn wrote: Way easier to just use a map. $mapping = array( 'Calgary' = abc@emailaddress, 'Brooks' = def@emailaddress, // etc ); $toaddress = $mapping[$city]; I would use this, but add a check to it. $mapping = array( 'default' =

Re: [PHP] Re: php form action breaks script

2012-06-15 Thread Jim Lucas
On 06/15/2012 06:35 AM, Jim Giner wrote: Hear, Hear for heredocs. The only way to code up your html. Took me a few months to discover it and haven't looked back since. The only problem I have with HEREDOC is I cannot use constants within them. -- Jim Lucas http://www.cmsws.com/ http

Re: [PHP] Re: show info from mysql db

2012-06-11 Thread Jim Lucas
, fast, and security-focused PHP framework http://nephtaliproject.com -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQL Injection

2012-06-08 Thread Jim Lucas
facts. Thanks -Govinda Ah, but what if I use sqlite or postgres? IMHO, the discussion needs to be a the best way to prevent SQL injection across all possible DB types. Not just mysql. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General

Re: [PHP] help with query

2012-06-07 Thread Jim Lucas
AND a.categoryid = c.categoryid -- You need to add this line to make it work, but keep the previous line AND a.categoryid = 1 ORDER BY a.startdate DESC ; -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http

Re: [PHP] Uploading large files with HTTP_Request class

2012-05-31 Thread Jim Lucas
PHP 5.3.0. Thank you and best regards, Marko -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Uploading large files with HTTP_Request class

2012-05-31 Thread Jim Lucas
to require additional dependencies yet you require PEAR. Isn't PEAR an addition dependency? I am currently using PHP 5.3.0. Thank you and best regards, Marko -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http

Re: [PHP] w.r.t. mail() function

2012-05-24 Thread Jim Lucas
file level access to the folder which his mail directory resides. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] w.r.t. mail() function

2012-05-23 Thread Jim Lucas
want it to be. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regexp novice

2012-05-17 Thread Jim Lucas
@gmail.com/pt.php http://cmsws.com/examples/php/testscripts/shiplu@gmail.com/pt.phps Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regexp novice

2012-05-17 Thread Jim Lucas
that I could think of for possible input. Give it a try and let us know. See it in action here. http://cmsws.com/examples/php/testscripts/shiplu@gmail.com/pt.php http://cmsws.com/examples/php/testscripts/shiplu@gmail.com/pt.phps Jim Lucas Thanks for the work you did, but I really wanted

Re: [PHP] regexp novice

2012-05-17 Thread Jim Lucas
On 5/17/2012 9:52 PM, Jim Lucas wrote: How about this instead? pre?php $times = array( '100', # valid '1100', # valid '1300', # invalid '01:00', # valid '12:59', # valid '00:01', # valid '00:25pm', # invalid '', # valid 'a00', # invalid '00', # invalid ); foreach ( $times AS $time ) echo

Re: [PHP] alias address in REMOTE_ADDR

2012-05-12 Thread Jim Lucas
On 5/11/2012 10:57 PM, Tóth Csaba wrote: Hi Everyone, I've run into a curious problem, not even really sure it's PHP, but that's where I caught it, so here it is: I have two servers hanging on the net, without proxies. Let's call them Server1 and Server2. Server1 has multiple IP addresses,

Re: [PHP] Converting date string to unix timestamp

2012-05-11 Thread Jim Lucas
DeSaulniers Design Drumm http://designdrumm.com -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Converting date string to unix timestamp

2012-05-11 Thread Jim Lucas
that... Figuring their is a logical reason... Ah! The first Saturday in the month of January this year WAS the 7th. The 1st was on a Sunday. I would say that your date picker has issues. Should be 20120101T162000Z not 20120107T162000Z Best, Karl On May 11, 2012, at 7:42 PM, Jim Lucas wrote: On 05/11

Re: [PHP] How to send XML requests from PHP?

2012-05-08 Thread Jim Lucas
/Evening Michelle Konzack Look into cURL http://php.net/curl -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to send XML requests from PHP?

2012-05-08 Thread Jim Lucas
On 05/08/2012 11:25 AM, Michelle Konzack wrote: Hello Jim Lucas, Am 2012-05-08 11:08:13, hacktest Du folgendes herunter: Look into cURL http://php.net/curl I know curl but I do not know, HOW to send the XML stuff. The XML code is generated using a temp file for logging, which mean, I can

Re: [PHP] date conversion/extraction issues

2012-05-03 Thread Jim Lucas
of class DateTime could not be converted to string in sql.php on line 379 I think you need to double check your variable names. In one place you are using $row['PDate'] in another you are referring to $row['date'] -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http

Re: [PHP] Problem with AssertTag: children count wrong

2012-05-02 Thread Jim Lucas
an idea whats going on? This is really freakin me out, could not find anything about it anywhere on the web. Kind regards, Michael -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] PHP Database Problems

2012-05-02 Thread Jim Lucas
= 23. Index Site Medical Record Notes Weight BMI Date Notice that it is entered into record 10003 The data is First Try Index Site Medical Record Notes Weight BMI Date 2590 AA 10003 First Try 189 31.4 02 May 2012 Help and advice, please. Thanks. Ethan -- Jim Lucas http://www.cmsws.com

Re: [PHP] PHP Database Problems

2012-05-02 Thread Jim Lucas
On 5/2/2012 4:28 PM, Duken Marga wrote: But I don't see any attachments in this message. This was in the first email of this thread. I can easily extract data from the database. However, if I try to enter data, it goes into the incorrect record. Following are some screenshots. The program

Re: [PHP] Re: No error reporting on

2012-04-23 Thread Jim Lucas
script. not the php.ini file -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP: a fractal of bad design

2012-04-17 Thread Jim Lucas
Stroustrup a simple +1 will do -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pcntl_fork behavior with php version 5.1.2

2012-03-29 Thread Jim Lucas
, Copyright (c) 1998-2010 Zend Technologies with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH This sounds more like an OS issue then a PHP issue. What are the two OSs involved? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com

Re: [PHP] Thinking out loud - a continuation...

2012-03-21 Thread Jim Lucas
examples of the code that retrieves the data and some of the actual output data? Then provide a structure that you want the data to look like when done. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] fgetcsv doesn't return an array?

2012-03-15 Thread Jim Lucas
(,, $csvCurrentLine); What does it say about the variable from the failing line? -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Jim Lucas
' second number and what the code returns is a string of the format '(number1)to(number2)' or simply '(number1)' - something fairly standard in PHP? But the nanny message says it need to be re-writen, the question is 'How?' :( -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples

Re: [PHP] Function mktime() documentation question

2012-03-08 Thread Jim Lucas
']; -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Function mktime() documentation question

2012-03-08 Thread Jim Lucas
On 03/08/2012 04:24 PM, Jim Lucas wrote: On 03/08/2012 03:14 PM, Tedd Sperling wrote: On Mar 8, 2012, at 11:20 AM, Ford, Mike wrote: -Original Message- From: Tedd Sperling [mailto:tedd.sperl...@gmail.com] From my code, the number of days in a month can be found by using 0 as the first

Re: [PHP] Function mktime() documentation question

2012-03-08 Thread Jim Lucas
On 03/08/2012 04:31 PM, Jim Lucas wrote: On 03/08/2012 04:24 PM, Jim Lucas wrote: On 03/08/2012 03:14 PM, Tedd Sperling wrote: On Mar 8, 2012, at 11:20 AM, Ford, Mike wrote: -Original Message- From: Tedd Sperling [mailto:tedd.sperl...@gmail.com] From my code, the number of days

Re: [PHP] Function mktime() documentation question

2012-03-08 Thread Jim Lucas
On 03/08/2012 04:44 PM, Jim Lucas wrote: On 03/08/2012 04:31 PM, Jim Lucas wrote: On 03/08/2012 04:24 PM, Jim Lucas wrote: On 03/08/2012 03:14 PM, Tedd Sperling wrote: On Mar 8, 2012, at 11:20 AM, Ford, Mike wrote: -Original Message- From: Tedd Sperling [mailto:tedd.sperl

Re: [PHP] Nested database loops and completing an unordered list....

2012-03-02 Thread Jim Lucas
' AND `BUSTIER3DATA` = 'KneeDIV01DEPT02' KneeDIV01DEPT02GRP04 7 SELECT DISTINCT `` FROM `POSITION_SETUP` WHERE `COMPANY_ID` = '3' AND `BUSTIER4DATA` = 'KneeDIV01DEPT02GRP04' 1054Unknown column '' in 'field list' -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http

Re: [PHP] curl equivalent in PHP

2012-03-02 Thread Jim Lucas
+ fread, etc... All you need to make sure is that allow_url_fopen is enabled. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   5   6   7   8   9   10   >