[PHP] FW:

2013-05-08 Thread Paul Novitski
http://www.shinwa-kensetsu.sakura.ne.jp/bth7rz.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Associative Arrays

2008-06-19 Thread Paul Novitski
At 6/19/2008 07:36 PM, Robert Cummings wrote: > >> 54321 => array( > >> 'mail' => '[EMAIL PROTECTED]', > >> 'companyName' => 'Asdfu Corp.', > >> ), > >> ); > > > > > > This is the right PHP syntax, except that you've got an extraneous comma > > before the closing parenthesis

Re: [PHP] Associative Arrays

2008-06-19 Thread Paul Novitski
il' => '[EMAIL PROTECTED]', 'companyName' => 'Asdfu Corp.', ), ); This is the right PHP syntax, except that you've got an extraneous comma before the closing parenthesis of each array that's going to throw a parse error. Regards,

Re: [PHP] losing mysql connection during cron job

2008-06-19 Thread Paul Novitski
At 6/18/2008 02:47 PM, Paul Novitski wrote: I've got a simple script running as a cron job that's getting intermittent "Lost connection to MySQL server during query" errors. At 6/18/2008 10:43 PM, Chris wrote: You need to do a mysql_close(); mysql_connect(...) before mys

Re: [PHP] Capitalization of variable

2008-06-18 Thread Paul Novitski
n if it's doomed never to actually arrive. Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] losing mysql connection during cron job

2008-06-18 Thread Paul Novitski
At 6/18/2008 04:49 PM, Shiplu wrote: why don't you edit your code? foreach (recipients as batch) { mail() using batch of recipients; mysql_query() update table; if(mysql_errno()==ERROR_CODE_YOU_GET){ mysql_connec

[PHP] losing mysql connection during cron job

2008-06-18 Thread Paul Novitski
I've got a simple script running as a cron job that's getting intermittent "Lost connection to MySQL server during query" errors. The script sends out listserve messages, 50 BCCs each minute, sleep()ing for 60 seconds between sends and updating a data table after each send. The whole BCC list

Re: [PHP] losing session in new window (IE only) [WAS: loosing...]

2008-03-25 Thread Paul Novitski
in double quotes and see if that helps: view details How does your page validate? http://validator.w3.org/ Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

RE: [PHP] PHP access of FileMaker data

2007-11-14 Thread Paul Novitski
At 11/14/2007 01:02 AM, George Pitcher wrote: Paul, > What I'm really looking for is a PHP class that will read FileMaker > files in their native format. I'm beginning to suspect that none > exists in the public arena. Someone please tell me there is! ... I'm just exporting my tables (files

Re: [PHP] PHP access of FileMaker data

2007-11-14 Thread Paul Novitski
here is! Regards, Paul At 11/12/2007 03:04 PM, Daniel Brown wrote: On Nov 12, 2007 5:58 PM, Paul Novitski <[EMAIL PROTECTED]> wrote: > Can someone please point me to some PHP code or documentation for > accessing FileMaker Pro tables with PHP? So far googling Zend and > wor

[PHP] PHP access of FileMaker data

2007-11-12 Thread Paul Novitski
Can someone please point me to some PHP code or documentation for accessing FileMaker Pro tables with PHP? So far googling Zend and world-wide hasn't found me what I'm seeking. Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Friday morning brain farts....

2007-08-10 Thread Paul Novitski
you'll want to check the incoming values to prevent SQL injection (q.v.). If you insert unevaluated input into an SQL query you're leaving yourself vulnerable to everything from data exposure to data manipulation from outside sources. Regards, Paul __ Paul Novi

Re: [PHP] Bizarre array create error

2007-07-29 Thread Paul Novitski
ge_height" with a space between - and >? Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Comment modes behavior in HTML and PHP

2007-07-28 Thread Paul Novitski
... */ and //... are PHP comments. The HTML comment syntax does not affect PHP, and PHP comment syntax does not affect HTML. http://www.php.net/manual/en/language.basic-syntax.comments.php Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com

RE: [PHP] Hide the real URL

2007-07-26 Thread Paul Novitski
cess his email because he couldn't find Explorer, and she advised him to click on Foxfire. (Great movie, though.) Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com

Re: [PHP] Hide the real URL

2007-07-26 Thread Paul Novitski
old on it myself. Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Hide the real URL

2007-07-26 Thread Paul Novitski
Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Hide the real URL

2007-07-26 Thread Paul Novitski
sset: http://php.net/isset file_exists: http://php.net/file_exists readfile: http://php.net/readfile @ Error Control Operator: http://php.net/@ Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Pirate PHP books online?

2007-07-17 Thread Paul Novitski
At 7/17/2007 07:42 PM, you wrote: Really people. I find it hard to believe that the otherwise-intelligent people on this list have such a hard time with the concept that something should not be done for reasons that don't involve physical property, just as I find it hard to believe that making u

Re: [PHP] Upload Tracker.

2007-07-17 Thread Paul Novitski
At 7/17/2007 11:46 AM, Tom Ray [Lists] wrote: I'm a little unsure on how to do this but basically when someone uses a form to upload a file I want to have a popup window come up and so the process in percentage of the transfer. Anyone do this before? Is it possible in PHP or do I need to do it

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Paul Novitski
corner of childhood poetry memories did that come from? It's easy to google... My god, Ella Fitzgerald? THE Ella Fitzgerald?? Yowsa! Bemusedly, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP Brain Teasers

2007-07-03 Thread Paul Novitski
At 7/3/2007 12:11 PM, Jay Blanchard wrote: [snip] if($x == 0.01 || $x == 1.0){ $y = "in"; } [/snip] In for a penny, in for a pound. Metric, that is! Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Ma

Re: [PHP] Date Calculation Help

2007-06-30 Thread Paul Novitski
2 etc. In PHP this could be: intval(($month - .1)/3 + 1) or: intval(($month + .9)/3) I believe you can use intval() and floor() interchangeably in this circumstance. Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraf

Re: [PHP] Updating dropdown list

2007-06-11 Thread Paul Novitski
cases to write nearly identical logic in key functions, reducing programming, debugging, and maintenance time. This technique is known variously as 'unobtrusive javascript' and 'progressive enhancement.' Regards, Paul __ Paul Novitski Juniper Webcr

Re: [PHP] explode string at new line

2007-06-05 Thread Paul Novitski
ll also running into \n\r although I can't recall which system uses it. As an alternative to PCRE, we can pass arrays to PHP's replace functions, e.g.: $txt = str_replace(array("\r\n", "\n\r", "\r"), "\n", $txt); Regards, Pau

Re: [PHP] Re: Re: Re: preg_match() returns false but no documentation why

2007-05-30 Thread Paul Novitski
eriod' is called in British English. http://google.ca/search?q=define%3Afull+stop In English syntax "period" and "full stop" are synonymous, and the RegEx manual is throwing "dot" into the same bag. Regards, Paul __ Paul Nov

Re: [PHP] Re: Re: preg_match() returns false but no documentation why

2007-05-30 Thread Paul Novitski
x Coach (a downloadable Windows application) by Edi Weitz http://weitz.de/regex-coach/ Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: preg_match() returns false but no documentation why

2007-05-30 Thread Paul Novitski
ifiers http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php "i (PCRE_CASELESS) "If this modifier is set, letters in the pattern match both upper and lower case letters." Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP] Return or not to return, that is the question

2007-05-30 Thread Paul Novitski
At 5/30/2007 10:51 AM, Richard Lynch wrote: On Wed, May 30, 2007 12:00 pm, Paul Novitski wrote: [snip] use the archives Good suggestion! HOWEVER: it is not a good idea, imho, to "always" let the errors bubble up to the outer layer, which is what Paul seemed to have typed...

Re[2]: [PHP] Return or not to return, that is the question

2007-05-30 Thread Paul Novitski
nction to call, with an option whether or not to return anything, it's clearly up to us to design and impose that architecture based on our knowledge and preferences. Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Paul Novitski
ayData($aResultSet); or: displayData(lookUpData()); in which lookUpData() returns a dataset array that's empty if no records were found or an error was encountered. In my programming style, I can't imagine wanting to write this code in such a way that lookUpData() didn't

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Paul Novitski
Looks like you are missing a comma on line 3. James Lockie wrote: I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = "Starting with" $newTypes[0][1] = strlen( $newTypes[0][0] ); Missing semicolon; Paul -- PHP General Mailing List

Re: [PHP] Random SELECT SQL list

2007-05-16 Thread Paul Novitski
At 5/16/2007 09:40 PM, Eduardo Vizcarra wrote: I would like to know if a SELECT SQL query list of records can be unsorted. SELECT statement retrieves a list of records from a certain table starting from record # 1 till record #N and when publishing the records, this is how it is presented, in a s

RE: [PHP] Bounty, NOW!

2007-05-15 Thread Paul Novitski
At 5/14/2007 11:51 PM, Brad Sumrall wrote: Yes, I do still need legit help. But obviously I needed to make a point to all the script kiddies out there that you are playing with fire if you even attempt to miss use an admin password or access a server that does not belong to you. That you posted

Re: [PHP] CMS

2007-05-08 Thread Paul Novitski
At 5/8/2007 12:47 AM, Jyoti wrote: Can anyone can tell me what CMS is? How can we make it? What are the requirements for it? A CMS is a software system for managing website content. To begin, click on these links: http://google.com/search?q=what+is+a+cms http://google.com/search?q=define%

Re: [PHP] Removing commas from number

2007-05-06 Thread Paul Novitski
characters mixed with the digits to indicate scale. Once you accept the input, then you could delete all the characters that aren't digits or period. Keep that decimal point, it's too significant to lose. Regards, Paul __ Paul Novitski Juniper Webcraft Lt

Re: [PHP] Removing commas from number

2007-05-06 Thread Paul Novitski
ges that should add to 100%. Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting multitple select values on PHP side

2007-05-04 Thread Paul Novitski
last one selected. I believe the common way to accomplish this is to add [] to the form element's name, which persuades PHP into treating it like an array: Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP Ge

Re: [PHP] Re: Name Capitalization

2007-05-04 Thread Paul Novitski
. If that were the case, prompting users to unstick their shift keys would be possible. Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What does "<<<" mean?

2007-04-30 Thread Paul Novitski
s not true, and now I use the simple shorthand: $sResult = <<<_ Some text. _; Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] explode in mysql query

2007-04-27 Thread Paul Novitski
7;,') LIKE '%,7,%' OR CONCAT(',', `groups`, ',') LIKE '%,14,%' Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CSS vs. Tables OT

2007-04-17 Thread Paul Novitski
we all use the same markup language that's presented somewhat differently from browser to browser. Is it possible that back in those first years of the world wide web no one was making a distinction between markup and layout? Hmm. Regards, Paul __ Paul Novitski J

Re: [PHP] CSS vs. Tables OT

2007-04-17 Thread Paul Novitski
eption and because it's an ad, my guess is that it's markup imposed on the designers from the outside. I didn't see a similar structure on the few sub-pages I glanced at, so it doesn't appear to be part of the overall layout strategy. Regards, Paul ___

Re: [PHP] Cheap Ping

2007-04-13 Thread Paul Novitski
com/vb/scripts/ShowCode.asp?lngWId=8&txtCodeId=1786 Pinging a remote host in PHP (using PEAR) http://builder.com.com/5100-6371-5234592.html What's a preferred method? Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP G

Re: [PHP] WYSIWYG vs. the 'power-user'

2007-04-12 Thread Paul Novitski
you see than the quality of what you get. ...Now that I've had my say... and as dear as this topic is to my heart... it's really off-topic for this list. I'd recommend WD-L http://webdesign-L.com/ Regards, Paul __ Paul Novitski Juniper Webcraft Lt

Re: [PHP] Array remove function?

2007-04-10 Thread Paul Novitski
d forth just to unset individual elements seems extremely inefficient. Besides, if the element values aren't unique, won't flipping the values & keys eliminate array elements that share the same value? Regards, Paul ______ Paul Novitski Juniper Webcraft Lt

Re: [PHP] Copying PHP array into a Javascript array

2007-04-10 Thread Paul Novitski
ement to browser echo "aFileArray = new Array('$html');"; or: echo <<<_ aFileArray = new Array('$html'); _; Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] coding MySQL error traps [WAS: mysql if empty]

2007-04-10 Thread Paul Novitski
rror('checking user name', mysql_errno(), mysql_error(), $sql); ... function ReportSQLError($context, $errno, $errorMsg, $sql) { if (bDebug) { die("MYSQL ERROR $errno $context:/>\n$errorMsg\n$sql"); } else {

Re: [PHP] mysql if empty

2007-04-09 Thread Paul Novitski
Otherwise, $result is the handle to the query's result. A successful (non-error-producing) query can return zero rows of data. A perfect example is when you check a user table to make sure a username isn't already taken before creating a new record. Read this page again carefully: http

Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-07 Thread Paul Novitski
(I can ask that all tables have at least a PK, but I can't ask that the PK is made of only one field). You can construct a single array key from multiple database fields: $aArray['pk_' . $aDataRecord['fieldA'] . '_' . $aDataRecord['fieldB']] =

Re: [PHP] Submitting as POST. Why?

2007-04-07 Thread Paul Novitski
utomatic modification of significant data without thoughtful validation of incoming data. As always. Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Submitting as POST. Why?

2007-04-06 Thread Paul Novitski
can't hack your system through the querystring, but you should already be doing this anyway whether you're using POST or GET. Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.ph

Re: [PHP] link counting

2007-04-06 Thread Paul Novitski
rs to use my contact forms more, but it hasn't appeared to have had that effect. Documentation links: http://php.net/count http://php.net/pcre.pattern.syntax http://php.net/preg_match_all http://php.net/preg_match_all http://php.net/preg_split http://php.net/strtolower http://php.net/substr-count

Re: [PHP] Idea/Suggestion for PHP App

2007-04-05 Thread Paul Novitski
ator/ SQL validator: http://developer.mimer.com/validator/parser200x/index.tml Good luck and have fun! Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Name Capitalization

2007-03-24 Thread Paul Novitski
how they spell their names. There simply are no rules that apply across the board, whether applied by machine or flesh. Anything but personal interviews is just informed guesswork. Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com

Re: [PHP] Name Capitalization

2007-03-23 Thread Paul Novitski
At 3/21/2007 04:57 AM, Shafiq Rehman wrote: Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization In this case, the OP has an existing list of names he wants to de-c

Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Novitski
sted to compare notes on strategies for implementing this efficiently in PHP. Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Name Capitalization

2007-03-19 Thread Paul Novitski
, but name capitalization seems doomed. Regards, Paul ______ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Separating HTML code from PHP code

2007-03-11 Thread Paul Novitski
end } plug error message into form } display form ___ If the user submits the form, the logic begins again. Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Joke of the day problem

2007-03-08 Thread Paul Novitski
the database of jokes, in whatever order, once a year. Rather than randomly selecting a record each time you pull a joke from the database, you apply any randomness you want once a year when the database is assembled. Regards, Paul __ Paul Novitski Juniper Webcraft

Re: [PHP] PHP or Bridge (card game)

2007-02-10 Thread Paul Novitski
At 2/10/2007 01:19 PM, pub wrote: Do any of you also know how to play bridge? If yes, which do you think is harder to learn, PHP or bridge? I don't think learning is so generalizable. In my experience, motivation has a lot to do with how easy things are to learn. If you're excited or passio

Re: [PHP] Multi lingual pages

2007-02-09 Thread Paul Novitski
lly appropriate for this list. I'd suggest taking it to one of these: multiweb.googlegroups.com Webdesign-L WSG (Web Standards Group) Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Ma

Re: [PHP] Javascript and $_POST

2007-02-07 Thread Paul Novitski
complete and it passes to the save page, none of my $_POST variables are being passed. Of course, all of your form fields need to be inside the same tags as your submit button. The sample HTML you posted did not indicate that you'd done this. Regards, Paul ______

Re: [PHP] Sorting issue

2007-02-07 Thread Paul Novitski
Employees.Position, Employees.LastName, etc FROM Employees, Positions WHERE Employees.Position = Positions.Position ORDER BY Positions.Sort, Employees.LastName (Assuming more than one employee per position, I figure you'd want a secondary sort criterion.) Regards, Paul

Re: [PHP] Stuffing code into variable

2007-02-03 Thread Paul Novitski
On Feb 3, 2007, at 10:04 PM, Paul Novitski wrote: By the way, if every cell in every row is class "tabletext" why have a class at all? You could simply apply the desired styles to the td element. At 2/3/2007 10:05 PM, Albert Padley wrote: As far as the CSS on the , other cells in

Re: [PHP] Stuffing code into variable

2007-02-03 Thread Paul Novitski
clean presentation: __ function drawTableRow($sqlrow) { return <<<_ {$sqlrow['time']} {$sqlrow['field']} {$sqlrow['division']} _; } __ By the way, if every cell in every row

Re: [PHP] Pop up window in PHP code

2007-02-03 Thread Paul Novitski
echo <<<_ This text doesn't "care" about quotes. _; Regards, Paul __ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Select record by ID

2007-01-30 Thread Paul Novitski
At 1/30/2007 02:14 PM, nitrox . wrote: If its not too much would you (or anybody) give a brief explanation of what this code is doing? Or are there any tutorials online that I can read that will educate me on this? Thanks again to all for your replies. Ive saved them all for future reference.

Re: [PHP] Select record by ID

2007-01-28 Thread Paul Novitski
At 1/28/2007 03:21 PM, nitrox . wrote: Im trying to display one record at a time by ID. Well im getting a blank page. Ive looked over my code and tried 20 different ways to get it to work to no avail. So any pointers on what Im doing wrong would be great. here is the code im working with so far

Re: [PHP] Multi lingual pages

2007-01-26 Thread Paul Novitski
At 1/26/2007 12:25 PM, Otto Wyss wrote: Paul Novitski wrote: In both cases I store the text in database tables that contain a language field I can select on to match the user's request. I wonder if retrieving static texts from the database draws too much performance. I know from somebod

Re: [PHP] bit wise math? Is there a function to easily return the bits?

2007-01-25 Thread Paul Novitski
At 1/25/2007 11:16 AM, blackwater dev wrote: Is there a php function I can call to pass in a number and get the values returned? For example, pass in 7 and get 1,2,4 ? Here's a slightly more off-the-wall contribution: function bin2array($iDecimal) {

Re: [PHP] sortind arrays

2007-01-24 Thread Paul Novitski
At 1/24/2007 10:12 PM, William Stokes wrote: How can I sort an array like this so that it would be ASC ordered by the [1] key in subarrays? I need to maintain only the subarray key - value pairs. (Do I make sense?) Array ( [0] => Array ( [0] => Logo [1] => Nam

Re: [PHP] Regular Expression Problem

2007-01-24 Thread Paul Novitski
At 1/24/2007 02:27 PM, Richard Luckhurst wrote: What I am trying to do is extract the first chunk. ... preg_match('##', $xml_string,$matches); $tempstr = $matches[0]; What I actually get in $tempstr is everything from the first through to the last (second) I would have expected preg_match

Re: [PHP] Multi lingual pages

2007-01-24 Thread Paul Novitski
At 1/24/2007 01:44 PM, Otto Wyss wrote: I'd like to make my pages multi lingual, showing everything in the language the user chooses. My pages show mostly static text. So what's the usual implementation for this case. This is a vast subject that deserves general study. I recommend that you

RE: [PHP] preg_match problem

2007-01-24 Thread Paul Novitski
At 1/24/2007 01:13 PM, Beauford wrote: > Here is my rendition of what I think you are looking for. > > $str = 'tab( )/space( )/[EMAIL PROTECTED]&*();:...'; > > if ( preg_match('|[EMAIL PROTECTED]&*();:_. /\t-]+$|', $str) ) { > echo 'success'; > } else { > echo 'failure'; > } > H

Re: [PHP] Splitting long text

2007-01-23 Thread Paul Novitski
At 1/23/2007 05:52 PM, Skip Evans wrote: I have a requirement to take a large amount of text, a story submitted to a competition, and split into displayable chunks of 600 words each. At 1/23/2007 07:20 PM, Anas Mughal wrote: // textwrap 1.1 Brian Moon <[EMAIL PROTECTED]> // This code is part

Re: [PHP] Splitting long text

2007-01-23 Thread Paul Novitski
At 1/23/2007 05:52 PM, Skip Evans wrote: I have a requirement to take a large amount of text, a story submitted to a competition, and split into displayable chunks of 600 words each. You can explode a text into an array of words, slice off a 600-element array, and implode the result back int

RE: [PHP] preg_match problem

2007-01-23 Thread Paul Novitski
At 1/23/2007 09:50 AM, Beauford wrote: > preg_match("/[EMAIL PROTECTED]&()*;:_.'\/ ]+$/", $string) > On top of this, every time a ' is entered it gets preceded by \. If I just check for the characters like below that doesn't happen. Totally confused. if(preg_match("/^[-A-Za-z0-9_.'

Re: [PHP] preg_match problem

2007-01-23 Thread Paul Novitski
At 1/23/2007 04:52 AM, Martin Alterisio wrote: if (preg_match('/[EMAIL PROTECTED]&()*;:_.'\\/ ]+$/', $string)) Close but no cigar. Because you're using apostrophe to quote the expression, PHP interprets the apostrophe inside the character class as ending the quoted expressions and fails

RE: [PHP] preg_match problem

2007-01-22 Thread Paul Novitski
At 1/22/2007 04:56 PM, Beauford wrote: I've probably read 100 pages on this, and no matter what I try it doesn't work. Including all of what you suggested above - is my PHP possessed? if(preg_match("/[EMAIL PROTECTED]&()*;:_.'/\\ ]+$/", $string)) { gives me this error. Warning: preg_match() [fu

Re: [PHP] preg_match problem

2007-01-22 Thread Paul Novitski
At 1/22/2007 03:04 PM, Beauford wrote: I'm trying to get this but not quite there. I want to allow the following characters. [EMAIL PROTECTED]&()*;:_.'/\ and a space. Is there a special order these need to be in or escaped somehow. For example, if I just allow _' the ' is fine, if I add the oth

Re: [PHP] one click - two actions?

2007-01-21 Thread Paul Novitski
At 1/21/2007 01:54 AM, pub wrote: I am working on my query as you suggested. I have a joint query that seems to work except that I get the name of the company repeated for each job. Could you please help me figure out how to make it echo the company once and list all the jobs next to it on the sa

Re: [PHP] PHP Warning: session_destroy

2007-01-20 Thread Paul Novitski
At 1/20/2007 02:14 PM, Andre Dubuc wrote: However, checking the live version, I get an secure-error_log entry: "PHP Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session" Question is: didn't the session_start(); on the calling page take effect, or is th

Re: [PHP] Storing dynamic attribute data in a db

2007-01-18 Thread Paul Novitski
At 1/18/2007 02:56 PM, Chris W. Parker wrote: I'm currently working on trying to find a solution that is both simple and flexible for storing the data of a complicated set of dynamic options for some of our products. My current thinking is that I will use Modified Preorder Tree Traversal to organ

Re: [PHP] More efficient thumbnail script

2007-01-16 Thread Paul Novitski
At 1/16/2007 12:54 PM, Jason Pruim wrote: First off, thanks to everyone who helped me get started with a thumbnail gallery that would display info you could just copy/paste into a weblog (Or any webpage) and have the picture display. I am moving along with a few additions and seem to be running

Re: [PHP] Going back with multiple submits to the same page

2007-01-15 Thread Paul Novitski
At 1/15/2007 01:52 PM, Otto Wyss wrote: When values are entered on one of my page I submit the result back to the same page (form action=same_page). Unfortunately each submit adds an entry into the history, so history back doesn't work in a single step. Yet if the count of submits were known I

Re: [PHP] colon in coma [was: Re: [PHP] Anyone would like to test my open source application http://sourceforge.net/projects/dfo/ ?]

2007-01-14 Thread Paul Novitski
, comma ; semicolon : colon http://www.usask.ca/its/courses/cai/javascript/js_semicolon.html http://en.wikipedia.org/wiki/Punctuation http://www.cogs.susx.ac.uk/doc/punctuation/node00.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] software recommendation: ServiceCapture

2007-01-02 Thread Paul Novitski
I've recently discovered a tool that I recommend for web work: ServiceCapture by Kevin Langdon http://kevinlangdon.com/serviceCapture/ It acts as an HTTP proxy, inserting itself between browser and the net, and logs the details of http requests and responses. It's been a great help to me late

Re: [PHP] Help me about detect client screen resolution!!!

2007-01-02 Thread Paul Novitski
At 1/2/2007 12:24 AM, Le Phuoc Canh wrote: Can we use php to detect client screen resolution? Please help me ? Do you really want screen resolution or do you want browser window size? Not every PC user keeps their windows maximized, and I have yet to meet a Mac user who attempts to do so.

Re: [PHP] php/ajax question

2006-12-30 Thread Paul Novitski
At 12/30/2006 10:56 AM, tedd wrote: Why can't the php script redirect the browser when called via ajax ? Ajax is giving PHP control over just that byte-stream that ajax is receiving and perhaps inserting into the page, not the full page itself. Say you use javascript to set the src of an im

Re: [PHP] Chocked

2006-12-28 Thread Paul Novitski
At 12/28/2006 03:51 PM, Skip Evans wrote: "chocked" ? "chocking" ??? RTFM: http://php.net/chocked Warm regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Script's length, echo, and execution speed

2006-12-23 Thread Paul Novitski
At 12/23/2006 10:33 AM, Jean-Christophe Roux wrote: Hello, I have this php script of 3,500 lines with a big switch that is such that on each pass maybe 300 lines of codes are executed at most. The current speed of the file is ok. I like to keep the file like that because at each pass there is a

Re: [PHP] Excluding apostrophe's

2006-12-22 Thread Paul Novitski
RAFMTD (Ian) wrote: ... $name = mysql_real_escape_string ($_POST['name']); ... mysql_connect("humbug",$username,$password); ... the script fails with the following report Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (

Re: [PHP] Database Question

2006-12-19 Thread Paul Novitski
At 12/19/2006 11:01 PM, Ashley M. Kirchner wrote: I'm starting to log weather data to a database and I'm trying to figure out what's the best way to create the tables. The reports are coming in every minute, of every hour, 24 hours a day. Eventually, I'd like to do some calculations on the

Re: [PHP] Re: ECHO

2006-12-18 Thread Paul Novitski
On 12/18/06, Fahad Pervaiz <[EMAIL PROTECTED]> wrote: I have written a framework for internationalization. Now i have incoorperate it into and existing system that is huge and it will take alot of time to change ECHO to a function call, so i want to override its implementation so that i can use

Re: [PHP] heredoc

2006-12-18 Thread Paul Novitski
At 12/18/2006 10:14 PM, clr wrote: Please can someone advise me on heredoc and its shortcommings, I am designing a complex site and elected to use DIV's as opposed to frames. Heredoc seems to be ideal in that I can do all processing first and then layout with relative ease. I was wondering if

RE: [PHP] Distinguishing between a mouse click and a refresh?

2006-12-04 Thread Paul Novitski
At 12/4/2006 01:08 PM, Jay Blanchard wrote: [snip] Is there any way for PHP to know whether it is being called due to a browser refresh versus a mouse click? I think the answer is no but I just want to be sure. Thanks. [/snip] Not unless you specifically capture and send a JavaScript onClick e

Re: [PHP] Tidy HTML source?

2006-12-01 Thread Paul Novitski
At 12/1/2006 02:22 PM, Richard Lynch wrote: On Thu, November 30, 2006 6:47 pm, Paul Novitski wrote: > A templating system requires the processor to merge content with > template. An inline markup assembly system requires the processor to > build the markup from function calls. Whe

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Paul Novitski
At 12/1/2006 10:17 AM, Scott wrote: For a project of mine, I need to keep the connection information to a MySQL server database on another server. I'm sure there are more efficient ways to do this, but here's a fall-back: Write a PHP program (web service) to run on the server where the datab

Re: [PHP] Tidy HTML source?

2006-11-30 Thread Paul Novitski
On Thursday 30 November 2006 18:51, Paul Novitski wrote: > With respect to separating code and markup, you said "sometimes there > are reasons not to do so, for example, web services." What are some > of those reasons? At 11/30/2006 10:57 AM, Sancar Saran wrote: Wha

  1   2   3   >