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,

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

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

[PHP] isset empty or ...?

2013-03-30 Thread John Taylor-Johnston
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
, 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] Populate input from another form

2013-03-08 Thread John Taylor-Johnston
I have a form form action=CRTP_Query.php id=CRTP_Query method=post target=_CRTPinput value=Query form=CRTP_Query type=submit/form OnSubmit, I want to include data from another form (form=DPRform). input name=DPRsurname type=text form=DPRform size=20 value=?php echo

[PHP] Re: Populate input from another form

2013-03-08 Thread John Taylor-Johnston
Scratch that, IE does not like form elements outside the /form!!?? :,( I can't a form within a form either, unless ... I float a div??. John Taylor-Johnston wrote: I have a form form action=CRTP_Query.php id=CRTP_Query method=post target=_CRTPinput value=Query form=CRTP_Query type=submit

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. form action=result.php method=post Number: input id=quantity type=text / button type=button onclick=OpenWindow()Submit/button /form or include it as one of

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

[PHP] Open form in new window

2013-03-03 Thread John Taylor-Johnston
I have many different submit button. input value=Update type=submit input name=DPRmode value=Enter Data type=submit 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] stripped \n

2013-02-20 Thread John Taylor-Johnston
Hi, I have a textarea when submitted creates a new form with the textarea data in a hidden field: input name=DPRnarration type=text hidden form=DPRform value=Enter call narration here. But when this new form gets resubmitted, the \n get stripped? input name=DPRnarration type=text hidden

Re: [PHP] phpinfo()

2013-02-20 Thread John Taylor-Johnston
Design in Motion Webdesign wrote: John Taylor-Johnston john.taylor-johns...@cegepsherbrooke.qc.ca 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? input type=button name=button2 id=button2 value=Print Mode

Re: [PHP] parsing select multiple=multiple

2013-02-19 Thread John Taylor-Johnston
'] == Unknown) Somebody once told me I had to do it this way? if (Unknown == $_POST['DPRlocationdetails']) John snip--- form action=foo.php id=DPRform method=postinput value=Update type=submit input type=checkbox name=DPRlocationdetails[] value

[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? input type=button name=button2 id=button2 value=Print Mode onclick=formSubmit() I really wanted to use a button to pass a different condition than a input type=submit

[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 input type=radio value=something. If

[PHP] parsing select multiple=multiple

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

Re: [PHP] parsing select multiple=multiple

2013-02-18 Thread John Taylor-Johnston
select multiple=multiple name=DPRtype form=DPRform option value=1. Crimes Against Persons1. Crimes Against Persons/option option value=2. Disturbances2. Disturbances/option option value=3. Assistance / Medical3. Assistance / Medical/option

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: syntax

[PHP] Expansion of Apache definitions

2013-01-10 Thread John Iliffe
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
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

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

2013-01-03 Thread John Iliffe
, 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

[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

Re: [PHP] Session data lost in Firefox

2012-10-26 Thread John Boy
+...@mail.gmail.com... On Fri, Oct 26, 2012 at 8:49 AM, John Boy serv...@greenholdings.co.ukwrote: 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

[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? ?php

[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: ? /div div id=footera href=*MailScanner has detected a possible fraud attempt from web-hosting-click.com claiming

[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

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 jt.johns...@usherbrooke.ca mailto:jt.johns...@usherbrooke.ca wrote: Hi, Sorting question. http://www.php.net/manual/en

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 jt.johns...@usherbrooke.ca 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

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
Matijn Woudt wrote: Taken from the natsort manual page comments: ?php /** * keyNatSort does a natural sort via key on the supplied array. * * @param $array The array to natural sort via key. * @param $saveMemory If true will delete values from the original array as it builds the

[PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
which words are more frequent. There is no |ascending/descending option to ksort?| Thanks, John Array ( [] = 1 [a] = 165 [about] = 4 [academy] = 4 [accident] = 3 [accidental] = 1 [accused] = 1 [achieve] = 1 [across] = 1 [act] = 3 [addition] = 1 [address

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
?php ... $words = preg_split('/[[:space:]]+/',$mynewstring); foreach ($words as $word) { $freq[$word]++; } ksort($freq); print_r ($freq); ? 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

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
?php ... $words = preg_split('/[[:space:]]+/',$mynewstring); foreach ($words as $word) { $freq[$word]++; } ksort($freq); print_r ($freq); ? 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

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 jt.johns...@usherbrooke.ca mailto:jt.johns...@usherbrooke.ca ?php ... $words = preg_split('/[[:space:]]+/',$mynewstring

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
?php ... $words = preg_split('/[[:space:]]+/',$mynewstring); foreach ($words as $word) { $freq[$word]++; } ksort($freq); print_r ($freq); ? Sort does not work seamlessly. I have my key

Re: [PHP] ksort by value

2012-09-03 Thread John Taylor-Johnston
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 jt.johns...@usherbrooke.ca

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 jt.johns...@usherbrooke.ca 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

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 split the hole text into

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

2012-09-02 Thread John Taylor-Johnston
. 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't? I'll never get it. Newest work on top of the pile

[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) {

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 jt.johns...@usherbrooke.ca wrote: I'll never get it. Newest work on top of the pile, instead of digging

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 jt.johns...@usherbrooke.ca 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

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); foreach($matches[1

[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? |?php $homepage =

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

2012-09-01 Thread John Taylor-Johnston
. 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 -- but you will want to feed strpos() an offset for matching -- 30

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

2012-08-20 Thread John Taylor-Johnston
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 brings new challenges. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[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

[PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston
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

Re: [PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston
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 quick search shows

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?

[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:

[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

Re: [PHP] mysqli sql question

2011-08-31 Thread John Black
/ my.ini and add the following line: log= /path/to/log/mysqld_query.log or log=D:\logs\mysqld_query.log More info here: http://dev.mysql.com/doc/refman/5.1/en/query-log.html I hope this helps ... ohh and don't forget to clear the log every now and then because it will get HUGE quickly. -- John

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

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 Blacks...@network-technologies.org 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

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

Re: [PHP] Dealing with multiple form submissions

2011-08-25 Thread John Black
is the 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] 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: Files YourXMLFile ForceType application/x-httpd-php /Files Hope this helps. -- John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

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

Re: [PHP] PayPal IPN

2011-07-28 Thread John Black
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

Re: [PHP] Membership site

2011-07-28 Thread John Black
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 List (http

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

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

[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
. 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://www.php.net/) To unsubscribe

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

2010-10-16 Thread John Taylor-Johnston
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

[PHP] Re: strtotime

2010-10-16 Thread John Taylor-Johnston
(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.net/manual/en/function.strtotime.php. -- PHP General Mailing List (http

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, dos and

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 coming

[PHP] Wordpress/PHP question

2010-03-22 Thread John Tamm-Buckle
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! John -- Out now: Kvist 002 - Raglani - Web of Light

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

2010-03-16 Thread John Black
. 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. [Sigmund Graff] -- PHP General Mailing List (http://www.php.net/) To unsubscribe

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.php'; require_once $include

Re: [PHP] Load simulation tests

2010-03-09 Thread John Black
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
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 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

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

2010-03-01 Thread John Black
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(p$sql/p.mysqli_error($link)); -- John Gerechtigkeit entspringt dem Neid; denn ihr oberster Grundsatz ist: Allen das

[PHP] Help preserving sentence structure

2010-02-26 Thread John Tamm-Buckle
as $line) { $sentence .= pre . $line . /pre; } } require 'sentence.php'; } else { require 'generator_form.php'; } } Many thanks, John -- Out now: Kvist 002 - Raglani - Web of Light - 12 Kvist 003 - EOD - untitled - 12 Kvist 004 - JD

Re: [PHP] Uninstalling PHP?

2010-02-26 Thread John Black
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.php.net

Re: [PHP] Sending e-mail via socket

2010-02-23 Thread John Black
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 (http://www.php.net

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
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] $_POST vs $_REQUEST

2010-02-22 Thread John Black
the data can not 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
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 Klarmachen zum Ändern! http

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
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: http://www.php.net

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: I'm

[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

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

2010-02-11 Thread John Black
at file_name on line 2 ) but on my machine all I get is this in html source of the output: pThe warning should be below this line/p pThe warning should be above this line/p 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

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 unsubscribe

Re: [PHP] Simple code obfuscation

2010-02-10 Thread John Black
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 :) -- John RIP

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?

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

[PHP] intermittent failure of php date

2010-01-18 Thread John Corry
. 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 help with intermittent failures of a date field in the DB? -- John Corry PHP developer - 3by400, Inc http

[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 jcorry.li...@gmail.com

[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] order by ASC

2010-01-16 Thread John Taylor-Johnston
. 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', 'Affiliated', 'Life Member') ORDER BY `rollnumber` ASC; rollnumber is a varchar(50). I need it to be a text field. ASC does not order

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') ORDER BY CAST(rollnumber

[PHP] parse date field

2010-01-14 Thread John Taylor-Johnston
How do I parse a date field from mysql? I was hoping this would work: $mydata-birthday = 2007-02-13; #What month is it? echo date(F, $mydata-birthday); #What year is it? echo date(Y, $mydata-birthday); What am I missing? All I get is December 1969. Hmmm? I am looking at the manual:

Re: [PHP] parse date field

2010-01-14 Thread John Taylor-Johnston
, John Taylor-Johnston john.taylor-johns...@cegepsherbrooke.qc.ca mailto:john.taylor-johns...@cegepsherbrooke.qc.ca wrote: How do I parse a date field from mysql? I was hoping this would work: $mydata-birthday = 2007-02-13; #What month is it? echo date(F, $mydata-birthday

[PHP] IDE - SVN - dev server - live server

2010-01-14 Thread John Corry
will work. This has got to be a fairly typical workflow and problem. What are some of the strategies you folks use for designing your flow of code from local IDE to SVN to dev server to production server? -- John Corry PHP developer - 3by400, Inc http://www.3by400.com

  1   2   3   4   5   6   7   8   9   10   >