Re: [PHP] Foreach and mydql_query problem

2013-07-22 Thread Jim Lucas
kg = $rad['adr_vekt_kg']; $varenavn = $rad['varenavn']; $emb = $rad['emb']; ?> Sprengstoff, 1.1D   "> " required="required"> " required="required"> -- 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
code that cannot be parsed, your commands listed above will never 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
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" To: "georg" Cc: ; 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 following, I have done: pecl list-all ; but dont find anything that

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

2013-05-13 Thread Jim Lucas
eps above, make sure you 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
uhosin.stealth = 1 php.ini:; 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 wrote: On 04/24/2013 02:40 PM, Ken Kixmoeller wrote: Thanks so much. Yes, we found that because PHP threw a

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

2013-04-24 Thread Jim Lucas
nt machine). 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/ -- P

Re: [PHP] variable type - conversion/checking

2013-03-15 Thread Jim Lucas
the OP wants to test 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
On 3/14/2013 4:05 PM, Matijn Woudt wrote: On Thu, Mar 14, 2013 at 11:44 PM, Jim Lucas 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

Re: [PHP] variable type - conversion/checking

2013-03-14 Thread Jim Lucas
sed 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/unsub.php

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

2013-03-02 Thread Jim Lucas
On 3/2/2013 11:56 AM, tamouse mailing lists wrote: Ah, crikey, syntax error!! $Body < should be: $Body = < AND... it should have 3 <<< instead of 2 << http://www.php.net/manual/en/language.types.string.php \ #language.types.string.syntax.heredoc -- Jim

Re: [PHP] Stupid question

2013-02-26 Thread Jim Lucas
#x27;}, $row{'product_Quantity'}, $_u_id); $_getSubTotal += $_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.cm

Re: [PHP] Arrays

2013-02-25 Thread Jim Lucas
, then do this: foreach ( $items AS $item ) { if ( array_key_exists('price', $item) ) { 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/ htt

Re: [PHP] stripped \n

2013-02-20 Thread Jim Lucas
found it on this page: http://www.w3.org/TR/html5/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/

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

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 unsubsc

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/example

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

2013-01-03 Thread Jim Lucas
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, visit: http://www.php.net/unsub.php

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

2013-01-02 Thread Jim Lucas
7;if ( $a="foo" && $b="0" ) { echo "\n\n{$a}\n{$b}\n\n"; }' In my testing, it does not. I 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] Boolean type forced on string assignment inside if statement

2013-01-02 Thread Jim Lucas
a "test". Can you please explain why you 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] 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? You have a typo. Line 8 What are you expecting as output? -- Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] storing & searching docs

2012-12-13 Thread Jim Lucas
the source file viewable 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

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] PHP site search broken?

2012-12-04 Thread Jim Lucas
and then click on one of the suggested "completions", it usually (not always) does the same thing. Etc. Hi, Works fine here. You could try a different mirror? or a different browser? Regards, Sebastian Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com --

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] PDO question

2012-11-28 Thread Jim Lucas
main back to it's self 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 Ge

Re: [PHP] CSV importer tool

2012-11-27 Thread Jim Lucas
, 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
ion. For example: If today's date is *11 Nov 2012* and the show's end date is *18 Nov 2012*, the message that I am getting 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

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] memory allocation error

2012-11-12 Thread Jim Lucas
g 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

Re: [PHP] memory allocation error

2012-11-12 Thread Jim Lucas
of what you know is the end of your 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:/

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
ws, I have nothing else to say -- 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] Send php Mail not working in MAMP (non pro version)

2012-10-18 Thread Jim Lucas
/which: no sendmail in (...) But as root, I get this [root@jim ~]# which sendmail /usr/sbin/sendmail So, make sure your apache&php 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 = loc

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

2012-10-17 Thread Jim Lucas
dard user on my linux box I get 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 apache&php user can see and execute sendmail -- Jim Lucas http://www.cmsws.com/ http://www.cms

Re: [PHP] foreach

2012-10-15 Thread Jim Lucas
1.05 And when $row is equal to 0 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/ htt

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) yo

[PHP] Ok then, here is a test

2012-10-13 Thread Jim Lucas
rver. It has been a while so I don't remember what the reason 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. -- J

Re: [PHP] Bounce messages

2012-09-21 Thread Jim Lucas
ginal Message- From: Ashley Sheridan [mailto:a...@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:

Re: [PHP] Bounce messages

2012-09-21 Thread Jim Lucas
spx?action=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] about PHP's filter_var function

2012-09-20 Thread Jim Lucas
On 09/20/2012 10:00 AM, Matijn Woudt wrote: On Thu, Sep 20, 2012 at 6:03 PM, Jim Lucas wrote: On 09/20/2012 02:35 AM, Sebastian Krebs wrote: Plaseplease update... 5.1.6 is from 2006! I read the "it's required", but I can't imagine _anything_ that it's worth it

Re: [PHP] about PHP's filter_var function

2012-09-20 Thread Jim Lucas
ires at least PHP version 5.2.0. so, Any other function in PHP 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

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

2012-09-14 Thread Jim Lucas
just 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.ph

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

2012-09-14 Thread Jim Lucas
process running as a daemon that can listen on a given IP:port . I do this on my php scripts right now. It accepts, processes, and responds to the client connections without the need of any other applications. And, it responds to the client from the IP & PORT that the client made the

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 t

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

2012-09-13 Thread Jim Lucas
pecific IP when 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

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

Re: [PHP] PHP to XLS Security Alert issue

2012-08-29 Thread Jim Lucas
it doesn't like, 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
t 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
On 08/24/2012 12:34 PM, Matijn Woudt wrote: On Fri, Aug 24, 2012 at 8:24 PM, Jim Lucas wrote: Personally, I let my code ramble on as long a line as it needs. I use tabs (set to 8 chars) in my code. That is because the other developers that I work with have editors that can display the tabs

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
On 08/24/2012 09:28 AM, tamouse mailing lists wrote: On Fri, Aug 24, 2012 at 10:16 AM, Jim Lucas wrote: On 08/24/2012 08:01 AM, tamouse mailing lists wrote: OT Reply -- just frustrated with the way email screws up program listings. It's a royal pain to have to strip out code and then p

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
On 08/24/2012 08:47 AM, Matijn Woudt wrote: On Fri, Aug 24, 2012 at 5:33 PM, Jim Lucas wrote: On 08/24/2012 08:25 AM, Matijn Woudt wrote: On Fri, Aug 24, 2012 at 5:22 PM, Jim Lucas wrote: Two simple guide lines will help everybody here. 1) Limit your lines to 80 characters 2) Use spaces

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
On 08/24/2012 08:25 AM, Matijn Woudt wrote: On Fri, Aug 24, 2012 at 5:22 PM, Jim Lucas wrote: Two simple guide lines will help everybody here. 1) Limit your lines to 80 characters 2) Use spaces instead of Tabs Are we going to discuss coding guidelines again? The 80-character limit is

Re: [PHP] Dynamic Content thoughts

2012-08-24 Thread Jim Lucas
Two simple guide lines will help everybody here. 1) Limit your lines to 80 characters 2) Use spaces instead of Tabs -- 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
code 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/example

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-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 with

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

2012-08-17 Thread Jim Lucas
ly 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 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 f

Re: [PHP] Too many open files

2012-08-09 Thread Jim Lucas
;hello-world1.txt'); echo 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 :

Re: [PHP] Too many open files

2012-08-09 Thread Jim Lucas
related functions to open/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 Luca

Re: [PHP] PHP session variables

2012-08-09 Thread Jim Lucas
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://www.php.net/)

Re: [PHP] magic getter

2012-07-19 Thread Jim Lucas
r; you are then simply echo'ing the variable/value you 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

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Jim Lucas
check fails for this site. Several online 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] 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(): $v) $trans[$k]= "&#".ord($k).";"; return strtr($string, $trans); } ?> It seems to work. For instance, this (assuming UTF-8 encoding): echo xml_character_encode('Château'); echo

Re: [PHP] PDO Prevent duplicate field names?

2012-07-02 Thread Jim Lucas
my mistake, 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:

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/

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

2012-06-11 Thread Jim Lucas
fixed. Typos can be little buggers to find sometimes. Adam -- Nephtali: A simple, flexible, 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
to gather 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.co

Re: [PHP] help with query

2012-06-07 Thread Jim Lucas
-- both tables 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.c

Re: [PHP] Uploading large files with HTTP_Request class

2012-05-31 Thread Jim Lucas
On 05/31/2012 11:34 AM, Bastien Koert wrote: On Thu, May 31, 2012 at 12:24 PM, Jim Lucas wrote: On 05/31/2012 03:28 AM, Voß, Marko wrote: Hello, I need to perform uploading of large files using the HTTP_Request class: http://pear.php.net/manual/package.http.http-request.php How am I

Re: [PHP] Uploading large files with HTTP_Request class

2012-05-31 Thread Jim Lucas
ntly 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://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-05-24 Thread Jim Lucas
On 05/24/2012 04:39 AM, Matijn Woudt wrote: On Wed, May 23, 2012 at 10:25 PM, Jim Lucas wrote: On 05/22/2012 09:12 PM, Ashwani Kesharwani wrote: Hi , I have a query w.r.t. mail() function in php. I have hosted my site and i have created an email account as well. when i am sending mail to

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
On 5/17/2012 9:52 PM, Jim Lucas wrote: How about this instead? \d{1,2}):?(?P\d{2})$#', $time, $m); if ( $m && ( 0 <= (int) $m['hour'] && 12 >= (int) $m['hour'] ) && ( 0 <= (int) $m['minute'] && 59 >= (int) $m[&#x

Re: [PHP] regexp novice

2012-05-17 Thread Jim Lucas
On 5/17/2012 8:07 PM, Jim Giner wrote: "Jim Lucas" wrote in message news:4fb5b89e.8050...@cmsws.com... On 5/17/2012 1:57 PM, shiplu wrote: On Fri, May 18, 2012 at 2:37 AM, Jim Ginerwrote: ok - finally had to come up with my own regexp - and am failing. Trying to validate an input

Re: [PHP] regexp novice

2012-05-17 Thread Jim Lucas
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] alias address in REMOTE_ADDR

2012-05-11 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, con

Re: [PHP] Converting date string to unix timestamp

2012-05-11 Thread Jim Lucas
... 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] Converting date string to unix timestamp

2012-05-11 Thread Jim Lucas
ch (Exception $e) { trigger_error("enddate error: " . $e->getMessage(), E_USER_ERROR); exit(1); } $stampnow = date('Ymd\THis\Z', time()); //$datestampnow = strtotime($stampnow); } ... ] I have a feeling I am mixing something up on my own, but I have been staring at this code

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

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

2012-05-08 Thread Jim Lucas
y hints please? Thanks, Greetings and nice Day/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] date conversion/extraction issues

2012-05-02 Thread Jim Lucas
:00:00";s:13:"timezone_type";i:3;s:8:"timezone";s:19:"America/Los_Angeles";}] if I were to directly insert the $row['date'] ms-sql value into mysq, I get this error; Catchable fatal error: Object of class DateTime could not be converted to string in s

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 i

Re: [PHP] PHP & Database Problems

2012-05-02 Thread Jim Lucas
ese. Normal BMI = 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 Lu

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

2012-05-02 Thread Jim Lucas
someone got 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: http://www.php.net/unsub.php

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
the ones nobody uses." -- Bjarne 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
(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/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

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/) To

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

2012-03-15 Thread Jim Lucas
; var_dump($csvCurrentLine); 155 $currentLine = implode(",", $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
ted in the array of pairs of numbers ( some with a 'blank' 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 ques

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] 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 in a

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
ear)); $days_in_this_month = 35 - $what_date['mday']; -- 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] Nested database loops and completing an unordered list....

2012-03-02 Thread Jim Lucas
tions on the returned array of data. It will save a little time by not hitting the DB on each function call too. Now I feel as if I am really close to a better solution than the brute force method. I may just be a little too frustrated to see what is a simple answer. Thanks for yo

  1   2   3   4   5   6   7   8   9   10   >