Re: [PHP] Algorithm Help

2013-10-01 Thread John Meyer
On 10/1/2013 12:51 PM, Floyd Resler wrote: Here's my task: A group of kids is going to be staying with different host families throughout the next 8 months. The number of kids staying with a host family can range from 2 to 10. When deciding which kids should stay together at a host family, t

Re: [PHP] strlen ?

2013-07-05 Thread John Meyer
MOTS: never take any input on faith. Jim Giner wrote: On 7/5/2013 3:02 PM, Stephen wrote: On 13-07-05 02:50 PM, Jim Giner wrote: Now the question is - how the heck did I put that in there? Certainly not intentionally. The data is captured from a d/e screen I wrote and it simply grabs the p

Re: [PHP] strlen ?

2013-07-05 Thread John Meyer
Jim Giner wrote: Trying to manage line breaks in some output I'm generating and using strlen to measure the lengths of the strings I'm printing. Discovered something strange (to me!) in that strlen is returning +1 more than it should. The strings are from a query of my database - simple name

Re: [PHP] REQUEST

2013-05-29 Thread John Meyer
Jim Giner wrote: On 5/29/2013 5:45 PM, Tedd Sperling wrote: PS: I think it probably best not to rise to the bait from people who forgot to turn off their cap's key. You call it "bait"? I call it stupidity. Once no, more than once YES. Why not both? Cue cute taco shell girl. -- PHP G

[PHP] isset empty or ...?

2013-03-30 Thread John Taylor-Johnston
php or is there another function I have not learned yet? I don't really get the difference between isset and empty. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MOSSCon in Louisville in May! Submit your proposal this week!

2013-03-27 Thread John List
inary proposal is this Friday, March 29! http://mosscon.org/ Spread the word and submit your proposal. Thanks, John Hicks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Populate input from another form

2013-03-08 Thread John Taylor-Johnston
Scratch that, IE does not like form elements outside the !!?? :,( I can't a form within a form either, unless ... I float a div??. John Taylor-Johnston wrote: I have a form target="_CRTP">type="submit"> OnSubmit, I want to include data from another form (

[PHP] Populate input from another form

2013-03-08 Thread John Taylor-Johnston
I have a form target="_CRTP"> OnSubmit, I want to include data from another form (form="DPRform"). value=""> I should use a hidden identical field and use form="CRTP_Query": "> But I have no idea how to populate the hidden field with the data from the viewable field. PHP cannot do this o

Re: [PHP] Open form in new window

2013-03-04 Thread John Taylor-Johnston
If you want to open a new page in response to a submit button press (using PHP) you may be out of luck. I don't know of a way to do it without involving another language. Opening a different page in the *same* window, yes. Otherwise, no. But watch the other replies. Maybe someone knows somet

Re: [PHP] Re: Open form in new window

2013-03-04 Thread John Taylor-Johnston
> You could echo HTML code e.g. Which is still purely HTML and has nothing whatsoever to do with PHP. > > > Number: > Submit > > > or include it as one of your form attributes: > > > First name: > Last name: > > Again, pur

[PHP] Open form in new window

2013-03-03 Thread John Taylor-Johnston
I have many different submit button. When php processes value="Enter Data", I would like to open a new window, but only if I click this one. Possible? I knw ther is an HTML target="" thingy. Can PHP do anything magic? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] phpinfo()

2013-02-20 Thread John Taylor-Johnston
Design in Motion Webdesign wrote: John Taylor-Johnston wrote: I cannot find button2 in phpinfo() when I click it. I was hoping to find a $_POST["button2"] value. What am I doing wrong? I really wanted to use a button to pass a different condition than a Use a differen

[PHP] stripped \n

2013-02-20 Thread John Taylor-Johnston
Hi, I have a when submitted creates a new form with the textarea data in a hidden field: But when this new form gets resubmitted, the \n get stripped? I don't get it. There is nothing in my code that is stripping the \n? value=""> Do I need to put it in another textarea and declare it

[PHP] if (empty versus if (isset

2013-02-19 Thread John Taylor-Johnston
What is the difference between? if (empty... http://www.php.net/manual/en/function.empty.php "Determine whether a variable is empty" and if (isset... http://php.net/manual/en/function.isset.php "Determine if a variable is set and is not *|NULL|*" I have an . If it is not checked, it is NOT

[PHP] phpinfo()

2013-02-19 Thread John Taylor-Johnston
I cannot find button2 in phpinfo() when I click it. I was hoping to find a $_POST["button2"] value. What am I doing wrong? onclick="formSubmit()"> I really wanted to use a button to pass a different condition than a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

Re: [PHP] parsing select multiple="multiple"

2013-02-19 Thread John Taylor-Johnston
o the function? Is this correct? if ($_POST['DPRlocationdetails'] == "Unknown") Somebody once told me I had to do it this way? if ("Unknown" == $_POST['DPRlocationdetails']) John snip--- type=

Re: [PHP] parsing select multiple="multiple"

2013-02-18 Thread John Taylor-Johnston
1. Crimes Against Persons 2. Disturbances 3. Assistance / Medical 4. Crimes Against Property 5. Accidents / Traffic Problems 6. Suspicious Circumstances 7. Morality / Drugs 8. Miscel

[PHP] parsing select multiple="multiple"

2013-02-18 Thread John Taylor-Johnston
I am capable with . (I suppose I did it correctly? :p ) But I haven't the first clue how to parse a and multiply select name="DPRtype". Would anyone give me a couple of clues please? :) Thanks, John Priority: {echo "selected";

Re: [PHP] PHP fails to install on Ubuntu 12.10. What's going on?

2013-02-14 Thread John Iliffe
On Thursday 14 February 2013 14:20:06 Chris Bergstresser wrote: > Hi all -- > >I've got a cloud server on Rackspace. If I bring up a fresh Ubuntu > 12.10 machine image, and type "apt-get install php5" it seems to > install fine. But if I then type "php -version" I get "PHP Parse > error: sy

[PHP] Expansion of Apache definitions

2013-01-10 Thread John Iliffe
plications want. --end quote Is there any development underway in PHP to have both of these addresses available in the $_SESSION global variable? Regards, John -- 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-03 Thread John Iliffe
uot; and the $b is set to "bar". Then the exterior part of the statement is evaluated: if ($a. ). It is this last operation that results in the path selection through the code, and in this case $a is "true", $b is not evaluated. mind you I'm basing this on my university basic programming course from almost 50 years ago :-) Regards, John -- 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-03 Thread John Iliffe
lse' value, whatever PHP uses for false) and $b is "bar" because that is what it is set to. Since the evaluation is within a bracket, the interior values ($a, $b) are set BEFORE the if condition is evaluated. I see neither a bug in PHP nor a variance from the expected result here. Regards, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session data lost in Firefox

2012-10-26 Thread John Boy
ap_uas_1w6e-nr-1shwm+...@mail.gmail.com... > On Fri, Oct 26, 2012 at 8:49 AM, John Boy > wrote: > >> Hi >> >> I have a wesite where PHP session data is passed page to page then shells >> out to Paypal for payment then back to my website for completion of >> transaction an

[PHP] Session data lost in Firefox

2012-10-26 Thread John Boy
Hi I have a wesite where PHP session data is passed page to page then shells out to Paypal for payment then back to my website for completion of transaction and update of mysql file. When using Firefox our session data and POST data from Paypal is lost. This has happend only recently and has w

[PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread John Taylor-Johnston
answers as to how someone is uploading and expanding *.tar.gz files. Thanks, john Rodrigo Silva dos Santos wrote: Hello John. This code generates the following html: ?> attempt from "web-hosting-click.com" claiming to be* "http://web-hosting-click.com/"; title=&q

[PHP] base64_decode

2012-10-02 Thread John Taylor-Johnston
Without anyone infecting their machines, can someone tell me what this is? I found a phishing site on my DreamHost server. DreamHost has been very helpful. We found a file containing this code. What is it? What does it contain? eval(base64_decode('Pz4gPC9kaXY+DQo8ZGl2IGlkPSJmb290ZXIiPjxhIGhyZWY

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
Matijn Woudt wrote: Taken from the natsort manual page comments: I've tried it. I don't see it sorting anything? http://cegepsherbrooke.qc.ca/~languesmodernes/test/keynatsort.php $words = preg_split('/[[:space:]]+/',$mynewstring); foreach ($words as $word) { $freq[$word]++; } function

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
David OBrien wrote: On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston mailto:jt.johns...@usherbrooke.ca>> wrote: Hi, Sorting question. http://www.php.net/manual/en/array.sorting.php I'm using ksort, which sorts like this. I don't want to use strolower

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
The problem is I'm sorting the key. The alphabetical thing is in the key. David OBrien wrote: On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston mailto:jt.johns...@usherbrooke.ca>> wrote: Hi, Sorting question. http://www.php.net/manual/en/array.sorting.php I&#x

[PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
Hi, Sorting question. http://www.php.net/manual/en/array.sorting.php I'm using ksort, which sorts like this. I don't want to use strolower. Is there a function/switch in one of the sort functions where I could get another aphabetical sort? http://www.php.net/manual/en/array.sorting.php has a lo

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
et vriendelijke groet, Serge Fonville http://www.sergefonville.nl Convince Microsoft! They need to add TRUNCATE PARTITION in SQL Server https://connect.microsoft.com/SQLServer/feedback/details/417926/truncate-partition-of-partitioned-table 2012/9/3 John Taylor-Johnston <mailto:jt.johns

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
Sort does not work seamlessly. I have my key and sort($freq); print_r ($freq); looks like: Array ( ... [1000] => 172 [1001] => 176 [1002] => 179 [1003] => 441 ) This is what I want: Array ( ...

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
Serge Fonville wrote: Have you looked at http://php.net/manual/en/array.sorting.php? 2012/9/3 John Taylor-Johnston <mailto:jt.johns...@usherbrooke.ca>> ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value to see which words are more frequent. There is no |ascending/descending option to ksort?| ksort sorts by key, if you want by value, look at sort. As to asc/desc sort, they just have a differen

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value to see which words are more frequent. There is no |ascending/descending option to ksort?| ksort sorts by key, if you want by value, look at sort. As to asc/desc sort, they just have a differen

[PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
Hi, If I have my terminology right, ksort($freq) sorts the array by the key. And that works fine. But I would also like to sort by value to see which words are more frequent. There is no |ascending/descending option to ksort?| Thanks, John Array ( [] => 1 [a] => 165

[PHP] load rtf file

2012-09-02 Thread John Taylor-Johnston
I have a big giant RTF file. I could convert it to plain text. BUT can PHP do it for me? Also: I want to read the text file into a string. This does the job well, right? http://php.net/manual/en/function.file-get-contents.php This is it? Not more complicated? |http://www.example.com/text.txt'

Re: [PHP] array_push

2012-09-02 Thread John Taylor-Johnston
Frank Arensmeier wrote: 2 sep 2012 kl. 19.48 skrev John Taylor-Johnston: Why not add two lines of code within the first loop? $chunks = explode("-30-", $mystring); foreach($chunks as $chunk) { preg_match_all("/News Releases\n(.+)/s", $chunk, $matches); fo

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-09-02 Thread John Taylor-Johnston
tamouse mailing lists wrote: On Sun, Sep 2, 2012 at 7:57 PM, John Taylor-Johnston wrote: Just to prove me right, our mail clients start quoting from the top too :)p Exactly. The quoting starts from the *top*. The problem is that the cursor to start typing is also put there by default. Step

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-09-02 Thread John Taylor-Johnston
"tamouse mailing lists wrote:" Just to prove me right, our mail clients start quoting from the top too :)p tamouse mailing lists wrote: On Sun, Sep 2, 2012 at 11:31 AM, John Taylor-Johnston wrote: I'll never get it. Newest work on top of the pile, instead of digging :)) Usuall

[PHP] array_push

2012-09-02 Thread John Taylor-Johnston
How can I clean this up? My approach would be to split the hole text into smaller chunks (with e.g. explode()) and extract the interesting parts with a regular expression. Maybe this will give you some ideas: $chunks = explode("-30-", $mystring); foreach($chunks as $chunk) { preg_match

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-09-02 Thread John Taylor-Johnston
s of "|News Releases|" and "-30". How do I deal with this? My code only catches the first instance. Thanks for you help so far. John I do find it intuitive actually, when reading things back your answer is after the question, which makes sense. The other way around doesn'

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-09-02 Thread John Taylor-Johnston
Frank Arensmeier wrote: >>> See: >>> http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php >>> http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps >>> >>> In $mystring, I need to extract everything between "|News Releases|" and >>> "-30". >>> >>> My approach would be to sp

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-09-02 Thread John Taylor-Johnston
On Sun, Sep 2, 2012 at 6:23 AM, John Taylor-Johnston wrote: See: http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.php http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.phps In $mystring, I need to extract everything between "|News Releases|" and "-30"

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-09-01 Thread John Taylor-Johnston
of "|News Releases|" and "-30". How do I deal with this? My code only catches the first instance. Thanks for you help so far. John You can use strpos() to find the location of "News Releases" then you can again use strpos() to find the location of "-- 30 --&quo

Re: [PHP] extract Occurrences AFTER ... and before "-30-"

2012-08-20 Thread John Taylor-Johnston
nks! Let me start with my first problem: I want to extract All Occurrences of text AFTER "News Releases" and before "-30-". http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.html How do I do that? Yeah, I am still asking first year questions :)) Every project br

[PHP] How do I do count the occurrence of each word?

2012-08-18 Thread John Taylor-Johnston
I want to parse this text and count the occurrence of each word: $text = http://www.cegepsherbrooke.qc.ca/~languesmodernes/test/test.html; #Can I do this? $stripping = strip_tags($text); #get rid of html $stripping = strtolower($stripping); #put in lowercase First of all I wa

Re: [PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston
I'm a top quoter. I would parse the text first. Phrase by phrase, or phrase segments. Then spit out a report. Marc Guay wrote: If that's not good enough, can you explain how you would like it to function? Would the whole paper be scanned phrase-by-phrase for matches and then spit out a report?

Re: [PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston
oter. It's more intuitive.) Thanks Ash. John Ashley Sheridan wrote: On Wed, 2012-02-15 at 21:56 -0500, John Taylor-Johnston wrote: How can I use PHP to interface with Google and see if this text exists on the internet? Wow, that's a pretty big project you're chewing there. A

[PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston
sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus." John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Need Part-time Coder

2011-12-27 Thread John R. Cornell II
Email PHP sample for consideration

Re: [PHP] Novice question

2011-10-31 Thread John Allsopp
> cURL is the best one in my experience, but you have to manage security > yourself. Meaning: Remember to escape/encode data. > > http://php.net/manual/en/book.curl.php Thanks everyone, appreciated, I'll investigate .. Cheers J >> -- >> 01723 376477 >> >> Cost-free marketing: http://www.flowmark

[PHP] Novice question

2011-10-30 Thread John Allsopp
Hi I'm afraid I've fallen a little out of touch with PHP dev, so a stupid question for you. I want to write a script that requests a URL and then reads that website .. I'm interested to map web structures. My web host is saying I'll need URL file access enabled but that it's a) a security risk an

Re: [PHP] mysqli sql question

2011-08-31 Thread John Black
7;t forget to clear the log every now and then because it will get HUGE quickly. -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread John Black
On 26.08.2011 07:56, tamouse mailing lists wrote: I'm encountering this on a script, but I can't figure out where it's actually failing. How do I debug this problem??? What does you log say? Make sure that you turn error reporting on and crank up the info it spits out. I always develop with

Re: [PHP] PHP within XML?

2011-08-25 Thread John Black
webserver that you want to treat your xml file as a PHP document. You can use .htaccess for this and add something like this: ForceType application/x-httpd-php Hope this helps. -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dealing with multiple form submissions

2011-08-25 Thread John Black
same. Most humans will view the message as the same but it is not. Anyway, the OP should have a few ideas now how to implement something that may work for his scenario. -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dealing with multiple form submissions

2011-08-25 Thread John Black
On 25.08.2011 15:00, Andreas wrote: Am 25.08.2011 11:01, schrieb John Black: True, a SESSION can be reset by closing the browser but I am not trying to deny a user from submitting different information again. I want to prevent them from submitting the same data again by accident (back button or

Re: [PHP] Dealing with multiple form submissions

2011-08-25 Thread John Black
On 24.08.2011 21:38, Mike Mackintosh wrote: On Aug 24, 2011, at 11:52, John Black wrote: On 08/24/2011 03:04 AM, Jason Pruim wrote: Wondering what everyone does to prevent multiple form submissions? My form is simply getting emailed to my email, and it redirects to a success page when

Re: [PHP] Dealing with multiple form submissions

2011-08-24 Thread John Black
On 08/24/2011 03:04 AM, Jason Pruim wrote: Wondering what everyone does to prevent multiple form submissions? My form is simply getting emailed to my email, and it redirects to a success page when submitted... Would it be as simple as doing something with the cache control? Basically I'm trying

Re: [PHP] Membership site

2011-07-28 Thread John Black
On 28.07.2011 12:53, Alex Nikitin wrote: Just as a word of caution to everyone on this list, mcrypt version of blowfish (which is implemented by php) (in linux) has an 8bit bug in it, and thus should not be used for hashing passwords even as backup. Basically if you use a character such as say a

Re: [PHP] Membership site

2011-07-28 Thread John Black
On 28.07.2011 11:13, John Black wrote: This approach makes it impractical to bruteforce the hash because every single test will have to run md5() 3000 times before it can validate a single hash. -- John I am sorry, I made a mistake here, 3000 times is not enough for this. The actual code for

Re: [PHP] Membership site

2011-07-28 Thread John Black
the class file and two sample pages demonstrating how to use the class. Here is a download link, let me know if you like it or have any questions. http://www.2shared.com/file/kocAJ2HO/class_password.html md5: 4ee41496a9d1bc147e5025699e2b764e class_password.zip -- John -- PHP General Mailing

Re: [PHP] PayPal IPN

2011-07-28 Thread John Black
com/file/77iofs md5: 09f3f92050264c370ada7944555373ce PayPal IPN.zip Good luck -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] 9970318527584

2011-02-18 Thread John Taylor-Johnston
9970318527584 Could this number refer to a date()? In late 2009? How could I calculate it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php running as module or cgi?

2010-11-12 Thread John Hicks
accessible to apache. If you have clients maintaining their own php code, they can access the code (and passwords and databases) of your other clients. I've never used cgi but I hope that it allows you to avoid this problem. Am I correct? --John -- PHP General Mailing List (http://ww

Re: [PHP] Re: strtotime

2010-10-17 Thread John Taylor-Johnston
Yaay, I'm 45 now :). Here is another nifty piece of code I found. How does this work? What is 31556926? function calculateAge($birthday){ return floor((time() - strtotime($birthday))/31556926); } echo calculateAge('1965-10-17'); http://ca.php.net/manual/en/function.floor.php ---

[PHP] Re: strtotime

2010-10-16 Thread John Taylor-Johnston
= date("m") - $month; $day_diff = date("d") - $day; if ($day_diff < 0 || $month_diff < 0) $year_diff--; return $year_diff; } echo birthday ($birthday); John Taylor-Johnston wrote: I'm working my way right now through the manual: http://ca.php

[PHP] strtotime

2010-10-16 Thread John Taylor-Johnston
egory Thans for any inspiration. I can find and hack code. I'm just like to understand it myself. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: SEO Experts?

2010-09-27 Thread john
> On 9/26/2010 8:09 AM, David Mehler wrote: >> Hello, >> Do we have any SEO experts on this list? I'm not one, learning only, >> reading a book and a few articles/tutorials from webmasters, and I'm >> wanting to optimize an existing site to get the best search rank >> possible. Some techniques, do

Re: [PHP] contant /

2010-04-08 Thread John Black
On 04/08/2010 06:51 PM, Andre Polykanine wrote: > 2. (Just a suggestion) It's better to put the SQL tables and > fields between grave accents (backquotes). But if you do that then you will have to remove them again when you decide to switch or support PostgreSQL. -- John After

[PHP] Wordpress/PHP question

2010-03-22 Thread John Tamm-Buckle
tion - headers already sent by (output started at /Users/sv/source/wpm/public_html/wp-content/themes/mystique/header.php:6) in */Users/sv/source/wpm/public_html/wp-content/plugins/wpm/wpm.php* on line *64* Line 64 contains the "header('Location: /?p=' . $postId);" line. Thanks!

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread John Black
On 03/16/2010 08:50 PM, John Black wrote: So I just set $include = './include/abc/def/' at the top of the correction, I set $include to the relative path of the include directory and then use it like this: $include = '../../include/'; require $include.'abc/file1.ph

Re: [PHP] best way to set up an include path for a multi-level project?

2010-03-16 Thread John Black
functions or classes when they need to include files. I use the later approach. As I said I never had a problem with it, it just requires consistency. -- John Eine der erstaunlichsten Erscheinungen ist, daß man sich einbildet, von abhängigen Menschen unabhängige Meinungen erwarten zu dürfen.

Re: [PHP] Load simulation tests

2010-03-09 Thread John Black
anything to be installed on your server. http://jakarta.apache.org/jmeter/ -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail Function In PHP

2010-03-08 Thread John Black
On 03/08/2010 10:45 PM, John Black wrote: You can use SPF, DomainKeys plus valid DNS information. I have setup SPF records for my domains. If you attempt to send E-Mail as if it was sent from my server then any server doing SPF record checking will not accept or simply drop your message. I have

Re: [PHP] Mail Function In PHP

2010-03-08 Thread John Black
E-Mail as if it was sent from my server then any server doing SPF record checking will not accept or simply drop your message. I have not setup DomainKeys since SPF has served me well but I will configure it soon. -- John Insanity in individuals is something rare - but in groups, parties, n

Re: [PHP] mysqli_connect problem

2010-03-01 Thread John Black
since most of the ones I have seen teach this kind of stuff but hopefully someone else on this list can. BTW, you can do your mysql connection this way and get the error returned plus the SQL query. mysqli_query($link, $sql) or die("$sql".mysqli_error($link)); -- John Gerechtigkeit

Re: [PHP] Uninstalling PHP?

2010-02-26 Thread John Black
I can start again?" Hello, Someone should be able to help you if you can provide us with the steps you tried and where you failed. -- John Der unmündige Untertan ruft die Polizei. Der mündige Bürger informiert seinen Anwalt. [Nikolaus Cybinski] -- PHP General Mailing List (http://www.ph

[PHP] Help preserving sentence structure

2010-02-26 Thread John Tamm-Buckle
ategory_choice'], $_POST['length_choice']); $lines = $gen->generate(); foreach ($lines as $line) { $sentence .= "" . $line . ""; } } require 'sentence.php'; } else {

Re: [PHP] Sending e-mail via socket

2010-02-23 Thread John Black
u still require it and I'll dig it out. -- John Ihr führt Krieg? Ihr fürchtet euch vor einem Nachbarn? So nehmt doch die Grenzsteine weg - so habt ihr keinen Nachbarn mehr. Aber ihr wollt den Krieg und deshalb erst setztet ihr die Grenzsteine. [Friedrich Nietzsche] -- PHP General Mailing List

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
tting form is written. This makes my form handling data more portable. -- John You may say I'm a dreamer, but I'm not the only one, I hope some day you'll join us, And the world will live as one. [John Lennon] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
s to the stored data is out of our control. Treating one any different from the other is just wrong and will create apps with security holes. For anybody who would like to try the GUI version of tampering with data sent to the server checkout TamperData for FireFox. -- John Klarmac

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
ot be trusted either way. -- John Gerechtigkeit entspringt dem Neid; denn ihr oberster Grundsatz ist: Allen das Gleiche. [Walther Rathenau] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
]); and use it like this. SELECT * FROM foo WHERE XXX=$tmp mysql_real_escape_string() protect from SQL injection by escaping your string according to what your charset requires. -- John Nur wer im Wohlstand lebt, schimpft auf ihn. [Ludwig Marcuse] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to secure this

2010-02-13 Thread John Allsopp
Robert Cummings wrote: Ashley Sheridan wrote: On Fri, 2010-02-12 at 16:12 -0500, Robert Cummings wrote: John Allsopp wrote: Hi everyone There may be blinding bits of total ignorance in this so don't ignore the obvious. This is a security question, but a sentence of background

[PHP] How to secure this

2010-02-12 Thread John Allsopp
Hi everyone There may be blinding bits of total ignorance in this so don't ignore the obvious. This is a security question, but a sentence of background: I'm writing software for a mapping/location website and I want to be able to provide something others can plug into their website that wou

Re: [PHP] PHP will NOT display this on my dev machine: Warning: session_start()...

2010-02-11 Thread John Black
Adam Richardson wrote: Do you have output buffering turned on? THANK YOU! That was it, for some reason ARCH has a "tweaked" php.ini in their main repo, that sucks. Thank you, I have been looking all over to fix this! -- John -- PHP General Mailing List (http://www.php.net/) To u

[PHP] PHP will NOT display this on my dev machine: Warning: session_start()...

2010-02-11 Thread John Black
e all I get is this in html source of the output: The warning should be below this line The warning should be above this line thx -- John Staat heißt das kälteste aller kalten Ungeheuer. Kalt lügt es auch; und diese Lüge kriecht aus seinem Munde: 'Ich, der Staat, bin das Volk.' [Frie

Re: [PHP] Simple code obfuscation

2010-02-10 Thread John Black
dling class. I know that this tool is available for "free" on some websites but make sure you purchase the latest edition. The program had a bug when generating random variables or function names. I reported it and they fixed it, so get the patched version or you will not be very happy :

[PHP] If the first four characters are "0000", then do {}

2010-01-25 Thread John Taylor-Johnston
I am reading the manual: http://ca.php.net/manual/en/ref.strings.php $mydata->restored = "-00-00"; How do I express this? If the first four characters are "", then do {} What I am looking for is in strpos(), no? if () { } -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Re: MySQL ID -- what happens when you run out of range?

2010-01-25 Thread John Meyer
On 1/25/2010 1:19 PM, Nathan Rixham wrote: Parham Doustdar wrote: Hello there, A friend called me today and was wondering what happens if the ID colomn of an MYSQL database, set to autoinc reaches the int limit. Will it return and begin choosing the ID's that have been deleted, or... what? you

[PHP] Re: intermittent failure of php date

2010-01-18 Thread John Corry
The field in the DB is defined as type date. I've had several event registrations for an upcoming event come through. THe event date is '2010-01-27'. 2 of the 5 event registrations contained empty values for the date. wtf? On Mon, Jan 18, 2010 at 10:23 AM, John Corry wrote:

[PHP] intermittent failure of php date

2010-01-18 Thread John Corry
nt_date. There are no other references to the variable $event_date. It works most of the time. There's no pattern I can see. I even tried to force it to show a date by selecting a formatted date and displaying that if the original programmer's strtotime failed. Where do you look for hel

Re: [PHP] order by ASC

2010-01-16 Thread John Taylor-Johnston
Did some googling. This worked: ORDER BY CAST(`rollnumber` AS SIGNED) What is the difference? My problem in the meanwhile must be my version of MySQL? John Taylor-Johnston wrote: It hates me: SELECT * FROM ... WHERE `type` IN ('Member', 'Affiliated', 'Life Member&#

Re: [PHP] order by ASC

2010-01-16 Thread John Taylor-Johnston
ASC' at line 1 I'll keep trying. Robert Cummings wrote: CAST it to an integer in the ORDER BY clause. Cheers, Rob. John Taylor-Johnston wrote: Ok, I think this is a MySQl question. Take pity on me? $sql = "SELECT * FROM $db.`mailinglist` WHERE `type` IN ('Member', 'A

[PHP] order by ASC

2010-01-16 Thread John Taylor-Johnston
Ok, I think this is a MySQl question. Take pity on me? $sql = "SELECT * FROM $db.`mailinglist` WHERE `type` IN ('Member', 'Affiliated', 'Life Member') ORDER BY `rollnumber` ASC"; rollnumber is a varchar(50). I need it to be a text field. ASC does not order the way I want. 1000 1001 998 999

Re: [PHP] What's the best way to extract HTML out of $var?

2010-01-14 Thread John Meyer
On 1/14/2010 7:15 PM, alexus wrote: > What's the best way to extract HTML out of $var? > > example of $var > > $var = "http://http://stackoverflow.com/"Stack Overflow" > I want > > $var2 = "http://starckoverflow.com/"; > example: preg_match(); > > what else? > Actually what it looks like you

Re: [PHP] strtotime

2010-01-14 Thread John Taylor-Johnston
My thanks to all! Adam Richardson wrote: I've not read this, but if the first valid date is Jan. 1st, 1970, then passing that date back in the case of errors would lead to ambiguity. Is it a valid date or is it an error. Passing back the date of the day just before (in terms of time, I think

[PHP] strtotime

2010-01-14 Thread John Taylor-Johnston
time("-00-00"); Nothing appears. So $then should be nothing? What is wrong with my logic? Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   5   6   7   8   9   10   >