Re: [PHP] Class instance pointers

2011-11-29 Thread Jim Lucas
t; > Thanks. > > -- > Cheers -- Tim > > Nope, AFAIK everything inside the function will disappear when the function exits. Unless you run into one of the memory release issues talked about in the past, in that case you might be SOL. -- Jim Lucas http://ww

Re: [PHP] Common way to store db-password of open session?

2011-11-29 Thread Jim Lucas
In some cases, I have seen were the first step is followed above, but then rather the just the identifiable information in the session, one would grab all the account details and place this information in the session instead. The only benefit I see here is the within future page requests, you

Re: [PHP] Auto CRUD Generator Xataface

2011-11-29 Thread Jim Lucas
On 11/29/2011 12:54 PM, Daevid Vincent wrote: > > > -Original Message- > From: Matijn Woudt [mailto:tijn...@gmail.com] > Sent: Tuesday, November 29, 2011 12:48 PM > To: Daevid Vincent > Cc: php-general-h...@lists.php.net; php-general@lists.php.net > Subject: Re: [PHP] Auto CRUD Generator

Re: [PHP] Webcal and file_get_contents

2011-12-06 Thread Jim Lucas
whole http access > myself, without being able to just pass it onto the internal http > processing code. > > I've done some web searching, looked through the PHP docs and had a > look through the archives here, but not managed to find anything > (sorry if I've missed

Re: [PHP] Problem with date

2011-12-07 Thread Jim Lucas
f (isset($pubdate)) $pubdate = strftime("%m.%d.%Y %H:%M:%S", $pubdate); > $out = $creator; > if ( ($creator != "") && ($pubdate != "") ) $out .= " @ "; > $out .= $pubdate; > echo "$title"; > echo "

Re: [PHP] Unique items in an array

2011-12-14 Thread Jim Lucas
ld you go about it? > > Thanks for any help, > Marc > Assuming you want to make things unique based on the "contact_first_name" field, how would you decide which record to keep? The first one you run in to, the last one you come across, or some other criteria? -- 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: Preferred Syntax

2011-12-15 Thread Jim Lucas
objects, and variable functions calls. But doesn't work if you try to call functions directly (bummer). $ cat variable_usage.php v1 = 'Object 1'; function something($str) { return "...{$str}..."; } $f1 = "something"; echo <<<_ {$v1} {$o1->v1

Re: [PHP] Unique items in an array

2011-12-15 Thread Jim Lucas
$k => $entry ) { $newDataSet[$entry['contact_id']] = $entry; unset($oldDataSet[$k]); } print_r($newDataSet); ?> This would result in something like this: Array ( [356] => Array ( [contact_id] => 356 [contact_first_name] =

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Jim Lucas
month 1 or 2 or whatever? > > If there are any links describing this process - that would be great > > any help would be appreciated... > > 1) What does your db schema look like? 2) What SQL do you currently use? 3) What criteria do you want to use to sort the data? 4) Will the

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Jim Lucas
ent. Then display the data looping through the mysql result set once without having to create the additional array mentioned in my first statement above. > > > >> >> >> -- > > -- > Thanks, > Dave - DealTek > deal...@gmail.com > [db-11] -- 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] Working on a Subsummary Report

2011-12-18 Thread Jim Lucas
umber? needs to be reset - but how? > > So is it not possible to loop more than 1x? Is that why we are loading into > array? Exactly > > > -- > Thanks, > Dave - DealTek > deal...@gmail.com > [db-11] -- 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] Working on a Subsummary Report

2011-12-19 Thread Jim Lucas
On 12/17/2011 4:21 PM, DealTek wrote: > > On Dec 16, 2011, at 12:56 PM, Jim Lucas wrote: >> >> >> 1) What does your db schema look like? >> 2) What SQL do you currently use? >> 3) What criteria do you want to use to sort the data? >> 4) Will the output be

Re: [PHP] PHP page source charset

2011-12-20 Thread Jim Lucas
at the output of your script, not the source for your script. The validation only happens after PHP has executed & processed the php script and sent the output to the browser. It is the source in the browser that the validation script sees. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.c

Re: [PHP] Online Form Creation

2011-12-22 Thread Jim Lucas
that will scrub the data and submit it to MySQL. > > The length and layout of the forms are of no significance. > > This is basic html/php -- try creating something and submit your work for our > review. If you want us to write the code for you, please look elsewhere. > > Cheers, > > tedd > > _ > t...@sperling.com > http://sperling.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] Error Reporting

2011-12-23 Thread Jim Lucas
ay_errors = On log_errors = On It shows me everything, including warnings. If you want to hide the Warning, then you would use this error_reporting = E_ALL & ~E_NOTICE display_errors = On log_errors = On E_NOTICE includes warnings. Reference here: http://us.php.net/manual/en/errorfunc.con

[PHP] Re: [php] static html search engine for php static html site

2011-12-26 Thread Jim Lucas
ww.cmsws.com/examples/search.php Source: http://www.cmsws.com/examples/search.phps Maybe it will give you a little start in the direction of writing your own solution. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (ht

Re: [PHP] Question about date calculations

2011-12-30 Thread Jim Lucas
gt;=($dteEndDate[$i]-7)&& $dteCheckDate<=($dteEndDate[$i]+1))&& $intDayCnt<16) if ( $dteCheckDate >= ( $dteEndDate[$i]->format('U') - (7*86400) ) && $dteCheckDate <= ( $dteEndDate[$i]->format('U') + (86400) ) &&

Re: [PHP] Variable Troubleshooting Code

2012-01-10 Thread Jim Lucas
I would change the above the the following: if ( empty($pmatch) || ( strpos($key, $pmatch) === 0 ) ) { print "$key = $value"; } it would be slightly faster -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (htt

Re: [PHP] Re: Settings to Allow Precise File Upload Bytes

2012-01-20 Thread Jim Lucas
or will fail? My last test case had the web page still claiming it was busy, yet I noticed that the above condition must have evaluated to FALSE, failing silently due to missing error reporting on my part (or the system's part). I am willing to make 2 requests: 1) just to find out if th

Re: [PHP] Re: sql injection protection

2012-01-26 Thread Jim Lucas
ode that doesn't read linearly... Most programmers will just ignore you. I want to say, "hey programmer, what you do in 2 lines of code, you can do in 1 and make it impossible to inject into", then, then people will listen, maybe... This is where inline string interpolation syntax

Re: [PHP] Re: File upload in map drive with PHP

2012-01-26 Thread Jim Lucas
On 01/26/2012 07:13 AM, Jim Giner wrote: You're using a GET in your script when your form is a POST. and if you look at the method value you will see that he is passing upload=1 in the URL. Which would be seen as a GET value. -- Jim Lucas http://www.cmsws.com/ http://www.cmsw

Re: [PHP] Re: Re: File upload in map drive with PHP

2012-01-28 Thread Jim Lucas
quot; together with method="post" Wrong! Try this... http://www.cmsws.com/examples/php/testscripts/linux4miche...@tamay-dogan.net/form_upload.php and you have to use Wrong. See above. Thanks, Greetings and nice Day/Evening Michelle Konzac

Re: [PHP] Selecting checkboxes based on SQL query

2012-02-23 Thread Jim Lucas
On 02/23/2012 11:30 AM, Rick Dwyer wrote: So, to use my existing function, how do I get the following array to look like the above one: Array ( [0] => Array ( [cb] => 2 ) [1] => Array ( [cb] => 6 ) [2] => Array ( [cb] => 1 ) ) $d = $a = array(); foreach ($d AS $r) $a[] =

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

2012-03-01 Thread Jim Lucas
h case, I cannot get it to go deeper. I have just been looking at it for too long. TVMIA! Forgot to say that if I isolate any one level without recursion I get all of the results for that level. How are you calling this? What are your initial arguments? What does your DB schema look like?

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

2012-03-02 Thread Jim Lucas
eeDIV01' KneeDIV01DEPT02 6 SELECT DISTINCT `BUSTIER4DATA` FROM `POSITION_SETUP` WHERE `COMPANY_ID` = '3' AND `BUSTIER3DATA` = 'KneeDIV01DEPT02' KneeDIV01DEPT02GRP04 7 SELECT DISTINCT `` FROM `POSITION_SETUP` WHERE `COMPANY_ID` = '3' AND `BUSTI

Re: [PHP] curl equivalent in PHP

2012-03-02 Thread Jim Lucas
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

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

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

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

2007-08-13 Thread Jim Lucas
;" in the Mind you that this will not work in IE, unless you put use a behavior script that adds onclick ability to the tag. Here is a link to the one that I use. http://www.cmsws.com/examples/css/behaviors/example.html check out the guts of the file to see all that is in use --

Re: [PHP] Date Problem with \n

2007-08-13 Thread Jim Lucas
:s a \on l F j, Y"); I get the number 8 (current month) where the n is supposed to be. Is there any way to get an "n" in there? Use single quotes, then your \n will not be converted to a NL char -- Jim Lucas "Some men are born to greatness, some achieve greatness,

Re: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Jim Lucas
Thanks! One thing to add to what everybody else is saying, is that you should use curly braces around your variable names. This way the parser will not get confused. $new = "{$good_day}{$fr['iop']}"; It just helps the parser recognize the beginning and ending of your vari

Re: [PHP] cant get if logic correct..

2007-08-15 Thread Jim Lucas
ing into what you need list($stnr, $subj, $mark) = explode(',', $lines[$i]); // Test for conditions if ( !empty($stnr) && !empty($subj) && !empty($mark) ) { // Do a lot of something lol } else { // Somethin

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
)"; $mybd=mysql_select_db("survey",$konek); $kueri=mysql_query($sqlnya,$konek); }else{ echo "I can't talk to the server"; exit(); } return $kueri; } } ?> = Theoritically if Class "koneksi" is being initialized than it p

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
{ echo "I can't talk to the server"; exit(); } return $kueri; } } ?> Please keep telling me. Thank you very much in advance. ps: Thanks a lot too to Nathan Nobe and Robert Gegen for their responds... On Wed, 15 Aug 2007 09:00:56 -0700 Jim Lucas <[EMA

Re: [PHP] adding "Back to Search results" link

2007-08-15 Thread Jim Lucas
to search results That should do GUIDE LINES FOR USE OF METHOD in forms POSTOnly use post when you are submitting a form that will change the data that you are submitting GET Use this for forms that do not change get, but only retrieve data. -- Jim Lucas "

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
nek); $kueri=mysql_query($sqlnya,$konek) or die('MYSQL QUERY ERROR ['.mysql_errno($konek).'] '.mysql_error($konek)); }else{ echo "I can't talk to the server"; exit(); } return $kueri; } } ?> === On Wed, 15 Aug 2007 13:13:18 -0700 Jim Lucas

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
Jim Lucas wrote: Patrik Hasibuan wrote: Dear Jim, thanks for your help. I've modified my codes as you adviced. But than the output is: " superclass koneksi dipanggil koneksi berhasil No results found " The column 'country' of table 'countries' already really

Re: [PHP] for loop inside a switch

2007-08-16 Thread Jim Lucas
Hulf wrote: Hi, switch ($q) { for ($i=0; $i <21; $i++) { case 'faq$i': echo $faq1; break; } } I just want to loop out a big long list of cases. are the case's that you want to create with the loop going to be the only case statements in the switch? -- Jim L

Re: [PHP] keeping fields moving forward

2007-08-21 Thread Jim Lucas
number? I am using php 5.2.1 and mysql 5.x thanks for your help. Are working with the data from Form 1 before going to form 2 and so forth? If you are not, then you could look into a three layered div with tabs and keep it all on one page. -- Jim Lucas "Some men are born to greatness,

Re: [PHP] keeping fields moving forward

2007-08-21 Thread Jim Lucas
1 & 2 before submitting all the data with form 3? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.n

Re: [PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread Jim Lucas
Linux NG/Lists wrote: get rid of the @, it will squelch your error output if (mysqli_connect_errno()) {echo 'Error ­ could not connect to database.'; exit; } ?> put something at the end like [DONE] or something so you can see if it is getting past that if statement.

Re: [PHP] Regular expression - URL validator

2007-08-27 Thread Jim Lucas
(ftp|(http(s)?))://)?(\.?([a-z0-9-]+))+\.[a-z]{2,6}(:[0-9]{1,5})?(/[a-zA-Z0-9.,;\?|\'+&%\$#=~_-]+)*$!i', $url) ) { echo "Matched"; } else { echo "Did not match"; } > > if ($valido == 0) { > something here; > } > else { > somethi

Re: [PHP] Regular expression - URL validator

2007-08-28 Thread Jim Lucas
)? in the url if ( strpos($url, array('https://', 'http://')) === false ) { $url = 'http://'.$url; } -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Sc

Re: [PHP] c++ and php! search for a brigde

2007-08-28 Thread Jim Lucas
exit } fclose($socket); } -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular expression - URL validator

2007-08-29 Thread Jim Lucas
o it turns to http://http://www.example.com I also tried with the strstr function, but receive the same response. Thanks in advance, Wagner. Give this a shot ftp://www.google.com";); echo "\n"; echo fixurl("http://www.google.com";); echo "\n"; echo fixurl

Re: [PHP] Round

2007-08-29 Thread Jim Lucas
Koen van den Boogaart wrote: Is it expected behaviour that outputs float(-0) What version of PHP are you running. I'm running 5.1.6 and I get float(0) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them.

Re: [PHP] Round

2007-08-29 Thread Jim Lucas
ed on 5.0.4 and 5.2.3. Think this through before you respond... Try this does this give you the desired results? What if I expected -1 for the last answer? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelft

Re: [PHP] Round

2007-08-29 Thread Jim Lucas
tead of 0 for the 4th entry. Am I correct with this? if so, you could try casting it as an int like so var_dump( (int)round(-0.26) ); That might fix the problem -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them."

Re: [PHP] Pragmatically changing a "Record Number"

2007-08-29 Thread Jim Lucas
t id to be used is 6. if you delete id # 2 and 3 the next id to be used will still be 6 not 2 it does not go back and fill in the holes/gaps -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Ac

Re: [PHP] Round

2007-08-29 Thread Jim Lucas
oes, I did passed my "basic math" class... Secondly, I have been the one trying to point out how this is the wrong approach. Finally, from what I can tell, the OP wasn't looking for a solution. He was looking for an answer as to why it returned -0 and not 0. -- Jim Lucas

Re: [PHP] CAN'T GET OUT OF THIS LIST

2007-08-29 Thread Jim Lucas
fails, or no response is received within a few days, the system will take your email address out of the list. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakesp

Re: [PHP] Internet Explorer Caching

2007-08-29 Thread Jim Lucas
Charlene wrote: Unfortunately I don't have a choice. I have to be able to handle IE. And IE is caching the page. I can see it in my Temporary Internet Files folder. And the Expiration Date is 3 hours after the file is created. If I delete the file, a new one is created and the Expiration Da

Re: [PHP] Using PHP to determine if user has Java installed

2007-09-05 Thread Jim Lucas
, unless it said so in the user-agent PHP -> server side client side -> javascript, etc... -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP

Re: [PHP] Buxa Coding Guidelines

2007-09-09 Thread Jim Lucas
brian wrote: Or, perhaps what you mean is that the PHP (as opposed to an XHTML parser misinterpreting PHP tags)? If that's the case, simply don't leave it bare in the script. Have PHP print it. brian Or, even better, turn off short_open_tag Then PHP will not try and parse http://www.php.net

Re: [PHP] upd sockets

2007-09-11 Thread Jim Lucas
igure out where in the data you need to start reading from that point to the end and then append that to the end of your existing table or data set in the current web page. Then wait a given time frame and do it again. This time passing the updated timestamp. Just a few ideas... -- Jim Lucas

Re: [PHP] look at all files, then go elsewhere

2007-09-11 Thread Jim Lucas
t while loop break; } } } } // Nothing was returned for any of the files that we found. if ( empty($userinfo) ) { echo "$user not found in any BP_CSV files, now running LDAP check"; ldap_check($user); } -- Jim Lucas

Re: [PHP] Getting line count of a text file

2007-09-12 Thread Jim Lucas
r.com> echo intval(str_replace(' '.$file, '', trim(system('wc -l '.$file; -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William

Re: [PHP] $ SERVER["REQUEST URI"] includes domain unexpectedly

2007-09-14 Thread Jim Lucas
h version of PHP and Apache (old and new) exactly? Sounds to me like the new system is running with a DNS redirect. A friend of mine a month ago or so, had a similar setup. He was using a DNS redirect to hit the correct page on a IIS server. Poor mans way of doing virtual hosting. Am I anywhere close

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Jim Lucas
run into the same problem even if you fork it within the php process of apache. What you are probably going to need to do is create your own custom script that will act as a daemon, and replace apache altogether. This way it is completely separate from apache. It can run on its own port and

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Jim Lucas
You might find that you need to do a little refinement to this process. But, this is where I would start. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shake

Re: [PHP] Try to find a solution, when restart Apache with PHP Script

2007-09-17 Thread Jim Lucas
ns for UDP connections on a given port and takes care of all incoming connections. What do you mean "should be started in web interface" ? Does this mean that it should only be running when you connect to it with a web browser? thanks np -- Jim Lucas "Some men are born t

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Jim Lucas
y_search($val,$Campaign_array); # What is $k at this point? An int (1, 2, 3, etc...) , string (Sunday, Monday, etc...) # Before I go any further I will need to know the above information. if ( ($k + 1) < count($Campaign_array) ) { echo $Campaign_array[$k + 1]; } -- Jim Lucas

Re: [PHP] PHP "preg_replace" help

2007-09-17 Thread Jim Lucas
e the GET method instead of POST. If not can you please tell me how to use preg_replace to remove the backslashes. Don't, use stripslashes() instead. http://us.php.net/stripslashes Here is a nice little hack that I use. you should see the difference -- Jim Lucas "Some

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Jim Lucas
REVISED Try this http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-17 Thread Jim Lucas
x27; /(length=2)/ 7 => string '20' /(length=2)/ 8 => string '25' /(length=2)/ 9 => string '30' /(length=2)/ Are there going to be wholes in the date range? if so, you will have to do that last bit like this. -- Jim Lucas "Some

Re: [PHP] dir_object->read() on different platform

2007-09-17 Thread Jim Lucas
news.php.net wrote: Hi! I have some text and JPEG files inside a directory like: 1992-7-11.txt 1992-7-11_pic1.jpg 2000-4-10.txt 2000-4-10_pic1.jpg 2004-5-2.txt 2004-5-2_pic1.jpg On a Windows box (XP + Apache), if I do a dir_object->read() for the directory, read() reads the files above "in order

Re: [PHP] dir_object->read() on different platform

2007-09-17 Thread Jim Lucas
Jim Lucas wrote: news.php.net wrote: Hi! I have some text and JPEG files inside a directory like: 1992-7-11.txt 1992-7-11_pic1.jpg 2000-4-10.txt 2000-4-10_pic1.jpg 2004-5-2.txt 2004-5-2_pic1.jpg On a Windows box (XP + Apache), if I do a dir_object->read() for the directory, read() reads

Re: [PHP] dir_object->read() on different platform

2007-09-17 Thread Jim Lucas
news.php.net wrote: Hi! I have some text and JPEG files inside a directory like: 1992-7-11.txt 1992-7-11_pic1.jpg 2000-4-10.txt 2000-4-10_pic1.jpg 2004-5-2.txt 2004-5-2_pic1.jpg On a Windows box (XP + Apache), if I do a dir_object->read() for the directory, read() reads the files above "in order

Re: [PHP] Case insensitive ksort

2007-09-18 Thread Jim Lucas
for me? thnx, Christoph Is this what you are looking for? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://

Re: [PHP] setting the document root path in linux

2007-09-19 Thread Jim Lucas
include paths and you wont have to worry if the system will have what it should in the $_SERVER['DOCUMENT_ROOT']. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V b

Re: [PHP] Page Numbering

2007-09-19 Thread Jim Lucas
ALWAYS displayed. Even though my $page variable IS being updated. Any ideas why my results are not reflecting the page I select? I would do it like this This assumes that 'credit_card_id' is unique, if it is not, then don't worry about reading the rest -- Jim Lucas &qu

Re: [PHP] Page Numbering

2007-09-19 Thread Jim Lucas
yup, sorry, missed that in the copy/paste remove the 'AS newtbl' part ORDER BY {$order_by_criteria}"; } ... run your $SQL statement here and work with the results ?> -- Jim Lucas "Some men are born to greatness, some achieve greatness, a

Re: [PHP] [SOLVED] Page Numbering

2007-09-19 Thread Jim Lucas
my_table WHERE my_table.column = 'P' AND credit_card_id NOT IN ( And it works like a champ. Thank you very much to everyone that helped me on this! On 9/19/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Dan Shirah wrote: Whenever the query has the NOT IN included

Re: [PHP] Page Numbering

2007-09-19 Thread Jim Lucas
Andrew Wilson wrote: What do I have to do to get off this list. Murder someone? Please take me off the list as I have already tried to unsubscribe several times. The email is registered under [EMAIL PROTECTED] -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent

Re: [PHP] Open New URL window

2007-09-19 Thread Jim Lucas
an image to the left. My problem is, I do not know how to make the Else statement... How do I get it to open a new url? I want it IF yes open this page, else open this page Andrew Prostko AProstko @ verizon.net You might be in need of the header() function in php -- Ji

Re: [PHP] scaling images

2007-09-20 Thread Jim Lucas
traight, you want to resize the image to 300x200 BEFORE you upload to your server? And since you are asking this on a PHP mailing list I am going to assume that you want to do this with PHP, correct? ... -- Jim Lucas "Some men are born to greatness, some achieve greatness, and s

Re: [PHP] Very Large text file parsing

2007-09-20 Thread Jim Lucas
Chris wrote: Paul Scott wrote: On Thu, 2007-09-20 at 09:54 -0300, Martin Marques wrote: If not, you should just use the COPY command of PostgreSQL (you are using PostgreSQL if I remember correctly) or simply do a bash script using psql and the \copy command. Unfortunately, this has to work

Re: [PHP] Page Numbering (To The Unsubscribe Guy)

2007-09-21 Thread Jim Lucas
relax with hot games and cool activities at the Messenger Café. http://www.cafemessenger.com?ocid=TXT_TAGLM_SeptWLtagline honestly, if he responded to either of the two un-subscribe submissions that I submitted for him, he is probably off the list already. -- Jim Lucas "Perseveranc

Re: [PHP] str_replace oddity

2007-09-22 Thread Jim Lucas
ally escape quotes with the attempt to make the values safer, and then you go and run your str_replace command and remove the double quotes, you end up leaving the '\' that the system automatically put in the value for you. read up on magic quote gpc hope this helps. Jim -- Jim Lucas

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread Jim Lucas
Jeff Cohan wrote: Dan Parry wrote: I might be wrong but this would be classed as 'exploitable'... Webservers should not be allowed to read from or write to clients... Of course there is ActiveX... I think we're off the point. My script is simply interrogating the value of the $_FILES[userf

Re: [PHP] php downlaod script

2007-09-25 Thread Jim Lucas
re are you actually outputting the $content??? is $size the actual size of the data? if so, you don't need to run filesize($size) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act

Re: [PHP] Newbie: special characters in regex?

2007-09-25 Thread Jim Lucas
University 111 Market Place, Suite 310 Baltimore, Maryland 21202 410-659-6139 For a simple string replacement, why not do something like this -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Ac

Re: [PHP] [Fwd: Attachment Size and Memory limit with php and FC6 System]

2007-09-26 Thread Jim Lucas
hanks your help ! Edward. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] IF's!

2007-09-26 Thread Jim Lucas
$total_pages = ceil($total_results / $max_results); //echo "Results per page: ".$max_results."\n "; //echo "Total results: ".$total_results."\n "; //echo "Total number of pages needed: ".$total_pages."\n "; ?> -- Jim Lucas "So

Re: [PHP] [Fwd: Attachment Size and Memory limit with php and FC6 System]

2007-09-26 Thread Jim Lucas
[EMAIL PROTECTED] wrote: > Jim Lucas wrote: > >> [EMAIL PROTECTED] wrote: >> >>> post_max_size = 10M >>> max_execution_time = 3600 ; Maximum execution time of each script, in >>> seconds >>> max_input_time = 3600 ; Maximum amount

Re: [PHP] counting with leading zeros

2007-09-26 Thread Jim Lucas
brian wrote: I have a directory that contains many images (no, not pr0n, unfortunately) and i'm working on an admin script for adding to it. I've got something that works alright but i'm wondering if there's a Better Way. Each image is named like: foo_01.jpg, foo_02.jpg, bar_01.jpg, and so on.

Re: [PHP] [Fwd: Attachment Size and Memory limit with php and FC6 System]

2007-09-27 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Jim Lucas wrote: [EMAIL PROTECTED] wrote: Jim Lucas wrote: [EMAIL PROTECTED] wrote: post_max_size = 10M max_execution_time = 3600 ; Maximum execution time of each script, in seconds max_input_time = 3600 ; Maximum amount of time each script may

Re: [PHP] problems with donwload

2007-09-27 Thread Jim Lucas
filename=$file_name"); here you are using $file_name header("Content-Length: ".filesize($file)); here you are using $file Isn't this something that someone pointed out earlier in the week? from the input script, it looks like you should be using $size instead of

Re: [PHP] [Fwd: Attachment Size and Memory limit with php and FC6 System]

2007-09-28 Thread Jim Lucas
2MB limit is a config option of Horde, NOT php Did you even read the page that I sent you for the Horde website? -- Jim Lucas "Perseverance is not a long race; it is many short races one after the other" Walter Elliot "Some men are born to greatness, some achi

Re: [PHP] Installation of pear

2007-09-28 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Dear All, Mine is FC6... Just download the pear from http://download.pear.php.net/package/PEAR-1.6.2.tgz So how to install the pear 1.6.2 with the system ? Thank for your help ! Edward. yum install php-pear -- Jim Lucas "Some men are born to greatness,

Re: [PHP] Session problem

2007-09-28 Thread Jim Lucas
g provider. Is this a single server that you have your web site on, or is it a farm of servers? -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP

Re: [PHP] Session problem

2007-09-30 Thread Jim Lucas
;t know whether these problems don't happend at all on this other application, or I just haven't come across one. :-( Dušan On 9/28/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Dušan Novaković wrote: Hi, I have two problems with sessions. Firstly, even though session limit is set on de

Re: [PHP] Secure Image Storage

2007-10-01 Thread Jim Lucas
tion from the header and readfile & passthru pages in the manual -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (h

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