Re: [PHP] Looking for a little MySQL help as well

2010-07-12 Thread Jim Lucas
Jim Lucas wrote: > Phillip Baker wrote: >> Thanks Jim, >> >> This outputs 2 results. >> Is there a way to get the one result set per product regardless of the >> number of categories associated with the product, yet displaying all the >> categories asso

Re: [PHP] Malformed UTF-8 Data in JSON

2010-07-14 Thread Jim Lucas
hat the value is. And, if my suspicion is correct it is going to be because when you stripslashes and then try and decode it, it breaks because the escaped characters are not longer escaped. My suggestion would be to UTF*_encode() each piece of data before you stuff it into your json string. Then

Re: [PHP] Weird behavior of exec()

2010-07-16 Thread Jim Lucas
t the php binary is not in my path. run this echo passthru('which php'); Also, modify your existing exec() command to the following and it will capture errors too. exec('php b.php > output.txt 2>&1 &'); After running this is when I noticed it say "sh: ph

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Jim Lucas
l the duplicates and left one instance of the multiple entry values. This will add a permanent unique restraint to the table. So, you will never have dupps again. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable variables into an array.

2010-08-10 Thread Jim Lucas
Richard Quadling wrote: Hi. Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... The output is an empty array. Examining $GLOBALS, I end up with an entries ... [Set] => Array ( ) [Entry] => Set[1] [Value] => Assigned

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread Jim Lucas
tedd wrote: At 12:15 AM +0200 8/29/10, Peter Lind wrote: On 28 August 2010 23:45, tedd wrote: > So, I'm trying to figure out a compliment to $_SERVER['SERVER_NAME'] such as something like $_SERVER['REMOTE_NAME']. > Is there such a beast? You're not making any sense. For the script on y

Re: [PHP] Secure Communication?

2010-08-29 Thread Jim Lucas
local data is located only on the remote server. So, my guess would be that the key would only be usable by the remote server. It would not work on the local server. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Removing link on the fly, but leave link text

2010-08-31 Thread Jim Lucas
lthough it isn't required, should be encoded and conversely will be decoded by the client. So, not to say that you are wrong, but I would suggest that it might be better to explain that the example you suggested should have been written in the following way instead. The > Operato

Re: [PHP] problem retrieving variables.

2010-09-02 Thread Jim Lucas
all in the parent script place echo $qp; to see if the value is what you expect? Then within edv.php add this var_dump($_REQUEST); and see if $_REQUEST['qp'] is there, and what it is. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SSI not working on PHP files with Apache

2010-09-02 Thread Jim Lucas
s it need to be configured in any special way to run them. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about translating assoc. arrays to C

2010-09-04 Thread Jim Lucas
p://devzone.zend.com/article/1021 http://www.talkphp.com/vbarticles.php?do=article&articleid=49&title=creating-custom-php-extensions http://www.php.net/~wez/extending-php.pdf Just to list a few... Jim Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Standalone WebServer for PHP

2010-09-10 Thread Jim Lucas
ini web server on my XP workstation just for testing little things. I have no idea how well it will perform in real world use nor have I tried it on any *nix setup. Just my experiences... Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: On 11 September 2010 17:56, Jim Lucas wrote: Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? I sat there for about a minute reading Ashley's comment

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jim Lucas
ce to the month. Here is a combination of Tamara's method and they way that I would do it based off her example. Some of hers didn't work for me out of the box, so I modified it to my liking. Then I included your request to do HEREDOC syntax for outputting the list. '. htmlspecialchars($mname).''; } $select_month_options = join("\n", $o); echo << {$select_month_options} HTML; ?> Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Checking file type when uploading

2010-09-17 Thread Jim Lucas
Catherine Madsen wrote: > Hi! > > I have created a form following the PHP manual to upload files and need > to restrict the upload to only PDF. How do I check the file type > ($_FILES['userfile']['type']?) and where: on the form page or on the > validation page? I want to be able to tell the use

Re: [PHP] PHP Email Question

2010-09-20 Thread Jim Lucas
Joe Jackson wrote: > Hi > > All I need is in the message body of the email is to include more data from > the form. At present it only displays the 'message' field value in the body > of the email. I need to add further information into the email from the > form such as 'address' 'name' and 'tel

Re: [PHP] version_compare

2010-09-30 Thread Jim Lucas
he > filter_var() be undefined? Because that's what is happening. > > Thank you. > > > > Personally, I would change that to be if ( function_exists('filter_var') ) { $text = filter_var($text, FILTER_SANITIZE_URL); } Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] version_compare

2010-09-30 Thread Jim Lucas
Brian Smither wrote: >> Personally, I would change that to be >> if ( function_exists('filter_var') ) { > > So would I: > *But it's not my code. > *I wish to learn and understand the cause of the problem - not walk around it. > >> It means condition (PHP_VERSION >= 5.2.0) > > I understand that.

Re: [PHP] open .zip from memory...

2010-10-04 Thread Jim Lucas
f this page will glean you any information http://us3.php.net/manual/en/wrappers.php.php I think the php://temp or php://memory will work for you instead of a file on the file system. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Returning results

2010-10-21 Thread Jim Lucas
Daniel P. Brown wrote: > On Wed, Oct 20, 2010 at 21:04, Bastien wrote: >> Yeah, it's got a few downsides! > > The next app for the iPhone should be a modification to the > spell-check to verify PHP functions in emails. > +1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] PHP Question

2010-10-28 Thread Jim Lucas
Paulo Work wrote: > Hello my name is Paulo Carvalho and I am struggling with the following: > > I am building a website with basic CMS functionality. > My problem is that in one of the pages I am using Easyslider to display > small comments about the clients. > > These comments are divided in 3 p

Re: [PHP] Apache mod_pagespeed

2010-11-03 Thread Jim Jagielski
l Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- === Jim Jagielski [|] j...@jagunet.com [|] http://www.jaguNET.com/ "Great is the guilt of an unnecessa

Re: [PHP] How to code in PHP an onchange event in a ?

2010-11-05 Thread Jim Lucas
On 11/4/2010 1:23 PM, Tomás Corrales Lemoine wrote: > Hi, List, > > I have this two files (“index.php” and “include.php”). They both work fine, > but I want to substitute the code for de onchange event in the tag. > Can I use PHP to code this event? How? Looks to me that you are looking for "cha

Re: [PHP] code quest

2010-12-01 Thread Jim Lucas
file read from that dir. Now how to do this in php? > This should do. The only problem that I foresee would be an empty "" if you have no directories returned by glob(). print(''); foreach ( glob('./*', GLOB_ONLYDIR) AS $dir ) print(''.$dir.''); print(''); Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] new keyword combined with other things...

2010-12-07 Thread Jim Lucas
On 12/7/2010 7:40 AM, Alexandru Patranescu wrote: > In many other languages this will work: > > *$result = new Object() -> method();* > > But in php, it fails at parsing. > I've tried with parenthesis around new but nothing. Anyhow, as I saw later, > *new* operator has precedence over others so t

Re: [PHP] array_multisort into Natural order?

2010-12-13 Thread Jim Lucas
On 12/13/2010 11:59 AM, George Langley wrote: > Hi all. Can use natsort($array1) to sort a single array of filenames into a > "natural "alphanumeric order - 1.php, 2.php, 5.php, 10.php, 20.php, etc. > But using array_multisort($array1, $array2, $array3) doesn't offer a natsort > option, so I end

Re: [PHP] HTML id attribute and arrays

2010-12-18 Thread Jim Lucas
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: U

Re: [PHP] array question

2010-12-18 Thread Jim Lucas
this answer anywhere, that's why I posted here. Cheers and thanks! Sure it CAN be done. Nobody laugh too loud here... But... Outputs: grape The {3} part is equivalent to the array position. Change that number, and you change which word will get displayed. Jim Lucas -- PHP Gene

Re: [PHP] goto - My comments

2010-12-21 Thread Jim Lucas
On 12/18/2010 9:17 PM, Ethan Rosenberg wrote: Dear List - Thanks to all for your EXCELLENT comments. I definitly agree that goto is a command to be avoided at all costs. In this case, I could not figure out how to acheive the desired result without the goto. So being a newbie, I humbly reque

Re: Fwd: Fwd: Re: [PHP] goto - My comments

2010-12-24 Thread Jim Lucas
On 12/23/2010 10:39 AM, Ethan Rosenberg, PhD wrote: Jim - Thanks ever so much! Here is the code I used, as you suggested. == $query = "select * from Intake3 where "; Maybe I missed it, but you need to have a 1 after the where part in your select. So... $query = &quo

Re: Fwd: Fwd: Re: [PHP] goto - My comments

2010-12-27 Thread Jim Lucas
On 12/27/2010 10:42 AM, Ethan Rosenberg wrote: > Jim - > > Thank you ever so much. > > At 01:58 PM 12/24/2010, you wrote: > >> Here you are using two different arrays. Yes, I know, they are basically the >> same, but they are truly not the same. In your case,

Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Jim Lucas
trim($number))) > { > return true; > } > > return false; > } > ?> > > Actually... Specified here [1] it says that the {1,} is the same as '+'. I think you should drop the comma. If you don't this would be valid 844-2345-123456 ^[2-9]{1,}[0-9]{2,}\-[2-9]{1,}[0-9]{2,}\-[0-9]{4,}$ should be ^[2-9]{1}[0-9]{2}\-[2-9]{1}[0-9]{2}\-[0-9]{4}$ 1 http://us.php.net/manual/en/regexp.reference.repetition.php Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
This is completely untested, typed directly in the email client. Most of the code is cut/paste from your examples. But, it should give you a good starting point for a multi-step form type. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
enters dob and presses submit 3. processing script stores dob submitted 4. display form 'B' 5. person enters name of kitten and presses submit 6. processing script retrieves dob previously stored 7. calculate age 8. display age ... 10. What happen to the kitten??? Form 'A&#x

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
Sorry for top posting! FYI: You might want to check the math in your calculations. It says that I am 41 when my birthday is tomorrow and I will be 36... On 1/4/2011 10:08 AM, Jim Lucas wrote: > On 1/4/2011 7:53 AM, Ethan Rosenberg wrote: >> At 03:45 AM 1/4/2011, you wrote: >>>

Re: [PHP] Two forms on one page

2011-01-04 Thread Jim Lucas
On 1/4/2011 12:53 PM, Paul M Foster wrote: > On Tue, Jan 04, 2011 at 10:08:47AM -0800, Jim Lucas wrote: > > [snip] > >> If this isn't it, I think you should explain (in sudo code) exactly the steps >> you are expecting things to. >> >> Example sudo cod

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

[PHP] Re: Email Antispam

2012-04-17 Thread Jim Giner
"David Mehler" wrote in message news:CAPORhP5Cuzd0Hb9gBFLESNe5LofDODN64S2UOAuMWCb=zoh...@mail.gmail.com... > Hello, > > I'm working on a site that has email addresses on it. I am not wanting > to use mailto links so as to avoid spam harvesters, I'd like another > solution so that mailto links wo

[PHP] Re: Email Antispam

2012-04-17 Thread Jim Giner
"Ross McKay" wrote in message news:b4vro79ftp9423k74bnj41o1o9e3dk9...@4ax.com... > On Tue, 17 Apr 2012 16:04:19 -0400, David Mehler wrote: > >>I'm working on a site that has email addresses on it. I am not wanting >>to use mailto links so as to avoid spam harvesters, I'd like another >>solution

[PHP] Re: Email Antispam

2012-04-18 Thread Jim Giner
"Ross McKay" wrote in message news:795so7t0avn28a5m8i373h9tursk15c...@4ax.com... > On Tue, 17 Apr 2012 21:11:45 -0400, Jim Giner wrote: > >>So - does that mean you building the site from information contained in a >>database? > > Yes. Client wanted email

[PHP] Re: No error reporting on

2012-04-23 Thread Jim Giner
Just my $.02, but don't you need: ini_set('display_errors', '1'); as well? "Dotan Cohen" wrote in message news:CAKDXFkMOH63=hnlekxugampqwrhvvet2x4iw-42soqkisrg...@mail.gmail.com... > Given this code: > > error_reporting(-1); -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Re: No error reporting on

2012-04-23 Thread Jim Lucas
On 04/23/2012 01:21 PM, Dotan Cohen wrote: On Mon, Apr 23, 2012 at 14:18, Jim Giner wrote: Just my $.02, but don't you need: ini_set('display_errors', '1'); as well? Possibly, thanks. I actually don't have access to that! That line should be placed in your

Re: [PHP] Re: No error reporting on

2012-04-24 Thread Jim Giner
Sounds like a very good reason to me? It's a development tool. Add it now, remove it later. "Dotan Cohen" wrote in message news:cakdxfkn+6mn9chuqdwevx5ap0km-rkls0q+carbf5hktvuo...@mail.gmail.com... On Mon, Apr 23, 2012 at 16:53, Jim Lucas wrote: >> Possibly, thanks.

Re: [PHP] url string being split

2012-04-26 Thread Jim Giner
I"m no expert, but why would you expose a query to the world thru the use of a GET? Why not just collect the params and build the string in your code? That is how people hack into your database - via a re-formed query. You're giving someone an open invitation. -- PHP General Mailing List

[PHP] undefined offset

2012-04-26 Thread Jim Giner
Sorry - can't seem to find anything that explains this on google. I'm using a List command to break out an array into distinct field names. I keep getting these errors as I go thru my loop:: Notice: Undefined offset: 10 in (.) on line 151 Notice: Undefined offset: 9 in (.) on line 151 N

Re: [PHP] undefined offset

2012-04-26 Thread Jim Giner
Thanks. That was it -my last line was null. - Original Message - From: "Stuart Dallas" To: "Jim Giner" Cc: Sent: Thursday, April 26, 2012 4:21 PM Subject: Re: [PHP] undefined offset On 26 Apr 2012, at 21:20, Jim Giner wrote: Sorry - can't seem to fi

[PHP] FPDF ?

2012-04-26 Thread Jim Giner
For those of you with FPDF experience. I've just begun using it and have figured out how it works I think. I am still having trouble with the bottom of the page tho. Seems that if I get too close to the bottom margin and my data line exceeds the amount of available space, my MultiCell element

[PHP] Re: Array_diff problems

2012-04-27 Thread Jim Giner
"Rick Dwyer" wrote in message news:0c0e6cc9-089d-4938-8b50-c9e12dfb3...@earthlink.net... Hello all. I have two arrays and when compared against each other via array_diff, I do not get any output: $myarray1 = Array ( [0] => Array ( [id] => 1 [Funding_Type] => Federal [Amount] => 10 [Frequency

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

[PHP] Re: function

2012-05-04 Thread Jim Giner
""Ron Piggott"" wrote in message news:499A66F0FB394E1DB44F7E0C011CF11C@RonPiggottPC... I need to access a FUNCTION I programmed within a different FUNCTION. Are these able to be passed like a variable? Or are they able to become like a $_SESSION variable in nature? How am I able to do this?

Re: [PHP] PHP & Database Problems -- Code Snippets - Any more Ideas?

2012-05-04 Thread Jim Giner
I don't think posting the same voluminous code is going to generate any better responses. The suggestion to start over and make your insert/retrieve queries fool proof before starting to write some logic into your code was a very good one. Why don't you work on that so that any requests for he

Re: [PHP] PHP & Database Problems -- Code Snippets - Any more Ideas?

2012-05-04 Thread Jim Giner
Nor will posting to multiple lists.(Sorry to the rest of you - didn't realize it until now.) ""Jim Giner"" wrote in message news:c6.f8.38082.efae3...@pb1.pair.com... >I don't think posting the same voluminous code is going to generate any >better respons

Re: [PHP] function

2012-05-04 Thread Jim Giner
But the OP says "function is defined inside a different function". Your theories to a solution don't fit that problem. "tamouse mailing lists" wrote in message news:cahuc_t-416_-lpcn3mo8qqxwrh4pnq5fmwouhwpdk+hmkgh...@mail.gmail.com... On Thu, May 3, 2012 at 9:12 PM, Ron Piggott wrote: Where i

[PHP] I'm missing something

2012-05-05 Thread Jim Giner
I have a discrepancy in the number of elements in my arrays and can't see why. Here is some code: Note the lines with the *** *** $plyrs = 0; unset($plyrnames_ar); unset($js_names); unset($js_seeds); *** $rows = mysql_num_rows($qrslts); ***echo "in mysql there are $rows rows"; while ($row =

Re: [PHP] I'm missing something

2012-05-05 Thread Jim Giner
My guess would be that you end up with 2 rows having the same $nm, overwriting the value that's already in $plyrnames_ar. - Matijn Genius at work! Thanks - I'll look into that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] I'm missing something

2012-05-05 Thread Jim Giner
Yup that was it! Something I knew would happen during my design, but forgot to code for now. ""Jim Giner"" wrote in message news:e2.dc.30075.c6ea5...@pb1.pair.com... > > > My guess would be that you end up with 2 rows having the same $nm, > overwri

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] 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] Converting date string to unix timestamp

2012-05-11 Thread Jim Lucas
is the block of code that I am using for this. Why do you have so much code to do such a simple thing? This works for me. Check it out in action: http://www.cmsws.com/examples/php/jquery_time_stamp.php http://www.cmsws.com/examples/php/jquery_time_stamp.phps Jim CODE [ ... } else { $dt_sta

Re: [PHP] Converting date string to unix timestamp

2012-05-11 Thread Jim Lucas
On 05/11/2012 05:55 PM, Karl DeSaulniers wrote: Thanks Jim, To tell you the truth, this was handed off to me. Thank you for the response. I knew this was just bloated code. Thanks for verifying that for me. :) Just one question, why does it echo the 7th and not the 1st? I see that

Re: [PHP] alias address in REMOTE_ADDR

2012-05-11 Thread Jim Lucas
the alias IP addresses back. What can cause this? I really need the eth0 IP address back in REMOTE_ADDR. Regards, Csaba What IP address is your Apache bound to? You eth0 or one of the alias IPs? Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Variables via url

2012-05-12 Thread Jim Giner
""Ashley M. Kirchner"" wrote in message news:4fad9d8b.4020...@pcraft.com... > > Can someone point me at examples or directions on how I can pass a > variable via a URL in the following way: > > http://server.domain.com//script///variable/ > > I will only be passing one single /variab

[PHP] regexp novice

2012-05-17 Thread Jim Giner
ok - finally had to come up with my own regexp - and am failing. Trying to validate an input of a time value in the format hh:mm, wherein I'll accept anything like the following: hmm hhmm h:mm hh:mm in a 12 hour format. My problem is my test is ok'ing an input of 1300. Here is my test: if (0

[PHP] Re: regexp novice

2012-05-17 Thread Jim Giner
OOPS FORGOT to mention that I modify the string to add a colon if it is entered without one, so my regexp always expects a ":" to be in the middle. So in actuality - my regexp is 'passing' a value of 13:00 as legitimate, when it should not be. -- PHP General Mailing List (http://www.php.net/

Re: [PHP] regexp novice

2012-05-17 Thread Jim Giner
"Yared Hufkens" wrote in message news:4fb5667d.7020...@yahoo.de... > Try this: > /(0?[1-9]|[12][0-9]):?[0-5][0-9]/ > > FYI: ? is equal to {0,1}, and [1-9] to [123456789] (and therefore [1-2] > to [12]). > > > Am 17.05.2012 22:37, schrieb Jim Giner: >>

Re: [PHP] regexp novice

2012-05-17 Thread Jim Giner
Thank you ! "Govinda" wrote in message news:3e5dce87-29c1-4679-ad3a-53326435f...@gmail.com... > > FWIW - I couldn't find much in the way of tutorials on the meanings of the > various chars in regexp's. this helps alot: http://www.gskinner.com/RegExr/ you can paste your pattern (needle) in the

Re: [PHP] regexp novice

2012-05-17 Thread Jim Lucas
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 of a time value in the format hh:mm, wherein I'll accept anything like the following: hmm hhmm h:mm hh:mm in

Re: [PHP] regexp novice

2012-05-17 Thread Jim Giner
"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. >>> >>>

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
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-18 Thread Jim Giner
"Jim Lucas" wrote in message news:4fb5decc.20...@cmsws.com... > On 5/17/2012 9:52 PM, Jim Lucas wrote: >> >> How about this instead? >> >> > >> $times = array( >> '100', # valid >> '1100', # valid >> '

Re: [PHP] regexp novice

2012-05-18 Thread Jim Giner
"Jim Lucas" wrote in message news:4fb5decc.20...@cmsws.com... > On 5/17/2012 9:52 PM, Jim Lucas wrote: >> >> How about this instead? >> >> > >> $times = array( >> '100', # valid >> '1100', # valid >> '

Re: [PHP] regexp novice

2012-05-18 Thread Jim Giner
"Stuart Dallas" wrote in message news:cc22e241-c1df-48e9-bf06-8a638a356...@3ft9.com... On 18 May 2012, at 14:32, Jim Giner wrote: > OK - I don't yet understand how this works, but it seems to work for > almost > all cases. The one erroneous result I get is from a v

Re: [PHP] regexp novice

2012-05-18 Thread Jim Giner
times so 40 minutes after minute would be a) not practical and b) still not I meant to say "40 minutes after MIDNIGHT". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regexp novice

2012-05-18 Thread Jim Giner
"Stuart Dallas" wrote in message news:79538829-bfc4-43a4-a413-72247b145...@3ft9.com... On 18 May 2012, at 14:41, Jim Giner wrote: > "Stuart Dallas" wrote in message > news:cc22e241-c1df-48e9-bf06-8a638a356...@3ft9.com... >> On 18 May 2012, at 14:32, Jim Gine

Re: [PHP] regexp novice

2012-05-18 Thread Jim Giner
"Stuart Dallas" wrote in message news:aba011df-8cdf-4492-be4d-51c2b54c4...@3ft9.com... On 18 May 2012, at 14:50, Jim Giner wrote: > Daft is a little harsh. :) 00:40 is just not a time value that is > generally accepted. It may appear harsh, but as far as I'm concern

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] 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] 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] 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] Read dynamic variable from HTML form into PHP

2012-06-05 Thread Jim Giner
"Govinda" wrote in message news:72497398-3a6c-4faa-89f2-565c18fd2...@gmail.com... On 2012-06-05, at 10:54 PM, Devangnp wrote: > I know how to pass variable but having difficulties when I use the dynamic > form field in HTML that add more boxes as per user require. > >>> Hi All, >>> >>> I am

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-06 Thread Jim Giner
"Maciek Sokolewicz" wrote in message news:4fcf23af.7040...@php.net... > On 06-06-2012 05:11, Jim Giner wrote: >> "Govinda" wrote in message >> news:72497398-3a6c-4faa-89f2-565c18fd2...@gmail.com... >> >> On 2012-06-05, at 10:54 PM, Devangnp wrote

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] 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] 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] global array

2012-06-14 Thread Jim Giner
Yes - PHP is very picky. Hence I never capitalize anything! I use underscores to make varnames more understandable, as in $inv_req -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] global array

2012-06-14 Thread Jim Giner
"Al" wrote in message news:6b.c0.39100.4ef1a...@pb1.pair.com... > > > On 6/14/2012 12:49 PM, Jim Giner wrote: >> Yes - PHP is very picky. Hence I never capitalize anything! I use >> underscores to make varnames more understandable, as in $inv_req >> &g

Re: [PHP] global array

2012-06-14 Thread Jim Giner
See - I didn't even notice he used camel-case - I thought he typed the same thing that got the OP in trouble. See how difficult that custom is? That's why for any case sensitive syntax, I stick to all lower case to avoid just that kind of bug-a-boo. -- PHP General Mailing List (http://www

[PHP] Re: php form action breaks script

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

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/

[PHP] phpinfo

2012-06-17 Thread Jim Giner
When one executes a phpinfo call, the display of info broken into the various sections mostly makes sense. The $_SERVER vars are listed with a _SERVER name, the environment ones show _ENV, and so on. But I question what are the duplicate ones that dont' have a prefix name. My concern is the P

Re: [PHP] phpinfo

2012-06-17 Thread Jim Giner
"Matijn Woudt" wrote in message news:cac_gtumpirenkswm2-lucwhbycmxdgg3a+hwr1aoqwiyz40...@mail.gmail.com... On Sun, Jun 17, 2012 at 10:22 PM, Jim Giner wrote: > When one executes a phpinfo call, the display of info broken into the > various sections mostly makes sense. The $

Re: [PHP] phpinfo

2012-06-17 Thread Jim Giner
oops - read the notes for PUTENV. Did the 'delete' properly and now I have no entries for php_auth_pw. For those reading along - to remove the variable use putenv("varname") NOT putenv("varname= '' "); Thanks Martijn!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] else if vs switch

2012-06-17 Thread Jim Lucas
d a check to it. $mapping = array( 'default' => 'defa...@domain.tld', ... ); ... if ( isset($mapping[$city]) ) { $toaddress = $mapping[$city]; } else { $toaddress = $mapping['default']; } Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] slicing and dicing strings

2012-06-27 Thread Jim Giner
"Stuart Dallas" wrote in message news:d889b8e1-2eab-4f36-83cb-8a52b5ec6...@3ft9.com... WARNING: May contain traces of sarcasm. If it would really take you 4 hours to find this out via the manual or Google then I think it would be 4 hours well spent: 3 hours 55 minutes learning how to use the ma

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

2012-06-27 Thread Jim Giner
"Tim Dunphy" wrote in message news:caozy0em5duhby-qv+y1u-e+c5yd7g5utauhomoyu3z7jma-...@mail.gmail.com... Notice: Undefined index: subject in /Library/WebServer/Documents/examples/ch03/final/makemeelvis/sendemail.php on line 23 Notice: Undefined index: elvismail in /Library/WebServer/Documents/

<    6   7   8   9   10   11   12   13   14   15   >