Re: [PHP] php mail() function

2009-10-22 Thread Paul M Foster
27;t know the mechanism by which they determine what is and isn't a dynamic IP.) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php mail() function

2009-10-22 Thread Paul M Foster
erver over there will trust. The "bounce" message you got indicates that relaying from you is forbidden at the destination mail server. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Spam opinions please

2009-10-20 Thread Paul M Foster
ughts on the script and its effectivness? > > $deny = array("111.111.111", "222.222.222", "333.333.333"); > if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { >header("location: http://www.google.com/";); >exit(); > } ?

Re: [PHP] PHP broadcast mailer

2009-10-17 Thread Paul M Foster
t; broadcast email script and willing to help me? > Use PHPList. It's free. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Native support to MS SQL Server

2009-10-09 Thread Paul M Foster
virtues? Of course not. He actually meant PostgreSQL, which *does* have virtues. (No flames. I'm teasing.) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newb question about getting keys/values from a single array element

2009-10-08 Thread Paul M Foster
#x27; => 'peach'); Then, out of all the POST members returned, I can pick out the ones pertaining to fruit by simply looking for ones which have the 'fruit_' prefix as their index. It tends to be clunky, but it's the only way I've found to make it work: $fruits = get_fruits_from_table(); foreach ($fruits as $key => $value) { $index = 'fruit_' . $key; if (isset($_POST[$index])) { echo "The user wants fruit #$key, $value."; } } Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] foreach insert error

2009-10-07 Thread Paul M Foster
elativly new to PHP so I may well be on the complete wrong track here. > so far I have tried imploding the array & posting an associative array. You don't actually saw what your real problem is, and I'm too lazy (and tired) to try to figure it out from your code. Can you elaborate?

Re: [PHP] Insult my code!

2009-10-07 Thread Paul M Foster
On Wed, Oct 07, 2009 at 11:31:58PM +0100, David Otton wrote: > 2009/10/7 Paul M Foster : > > > I think this is a bit extreme. It really depends on what's in your > > parent model class. It could be something really simple, but something > > you don't want to

Re: [PHP] Insult my code!

2009-10-07 Thread Paul M Foster
functions; just change the guts of the function, while still providing the same inputs and outputs. 4. It keeps the stack cleaner. I don't have to pass the same crap to every related function. I can keep the data inside my class and have all the methods share it. The notion that OOP was go

Re: [PHP] Apache Rewrite Issues

2009-10-07 Thread Paul M Foster
ho first came up with allowing this in filenames. I have a special voodoo doll just for that person, when I find them. As you can see, it causes all manner of odd problems, no matter what OS it's on. (My local LUG list is periodically hit with messages from people trying to overcome the problem

Re: [PHP] Insult my code!

2009-10-07 Thread Paul M Foster
oteric points about what should or shouldn't be in models and controllers, etc. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo

2009-10-06 Thread Paul M Foster
and Ritchie. I don't imagine they ever foresaw anyone doing something as silly as a = a++; except under the rarest of circumstances. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Curl output

2009-10-01 Thread Paul M Foster
script, but if the CSS is an external file, then it wouldn't get dragged along with the original file, and thus wouldn't be there to style anything on the HTML page. Just a guess. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POST without POSTing

2009-10-01 Thread Paul M Foster
On Thu, Oct 01, 2009 at 04:23:46PM -0400, Daniel Brown wrote: > On Thu, Oct 1, 2009 at 16:14, Paul M Foster wrote: > > > > Okay, I've figured out how to shove the data through cURL to the > > receiving URL, but then it occurred to me that the client browser

Re: [PHP] POST without POSTing

2009-10-01 Thread Paul M Foster
On Wed, Sep 30, 2009 at 11:36:55PM -0400, Daniel Brown wrote: > On Wed, Sep 30, 2009 at 23:29, Paul M Foster wrote: > > > > I'm not sure how to do this. Please no exotic external libraries my > > shared hosting provider doesn't include. RTFM will be fine; just t

Re: [PHP] POST without POSTing

2009-09-30 Thread Paul M Foster
On Thu, Oct 01, 2009 at 12:24:41AM -0400, Daniel Brown wrote: > On Thu, Oct 1, 2009 at 00:16, Paul M Foster wrote: > > > > However, assuming it *wasn't*, I've found the following example from a > > google search (thank goodness for google's "hinting"

Re: [PHP] POST without POSTing

2009-09-30 Thread Paul M Foster
On Wed, Sep 30, 2009 at 11:36:55PM -0400, Daniel Brown wrote: > On Wed, Sep 30, 2009 at 23:29, Paul M Foster wrote: > > > > I'm not sure how to do this. Please no exotic external libraries my > > shared hosting provider doesn't include. RTFM will be fine; just t

[PHP] POST without POSTing

2009-09-30 Thread Paul M Foster
do this. Please no exotic external libraries my shared hosting provider doesn't include. RTFM will be fine; just tell me which Fine Manual to Read. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Extract links from strings

2009-09-21 Thread Paul M Foster
orem ipsum dolor http://www.site.net sit amet'; > > How can I extract the URL from these strings? > They can be [http:// + url] or [www. + url]. > Use the preg_match() function (see http://us2.php.net/manual/en/function.preg-match.php ) and a good regular expression from a place lik

Re: [PHP] Question: Correcting MySQL's ID colomn when removing an entry

2009-09-20 Thread Paul M Foster
fetching of a single unique record within the table. Autoincrement fields are not designed to be used to order the records in a table. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ckeckbox list populated from database

2009-09-19 Thread Paul M Foster
ue you set in the value="something" attribute. Checkboxes and radio buttons are tricky in this way, because they don't normally return values in the same way an field does. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Does anyone here use TCPDF?

2009-09-18 Thread Paul M Foster
sting TCPDF methods to actually *build* the PDF from scratch, with additional method calls to put in your content. That is, build and populate each time you need the form. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ie6 "memory could not be read" help!

2009-09-17 Thread Paul M Foster
I normally browse with Firefox on Linux, if a site gets pissy with me and insists I use IE or Mozilla on Windows, I typically don't go there anymore. So if you're interested in driving off people who are less technologically advanced than you'd like, I think you'll probably succeed. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP GURU NEEDED

2009-09-14 Thread Paul M Foster
On Mon, Sep 14, 2009 at 08:56:59PM +0200, Andrea Giammarchi wrote: > > You are looking for me than, cool! > I can vouch for the fact that Andrea believes he's "all that". Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-13 Thread Paul M Foster
was not just to > waste my time guys, and it is open source, maybe next time I'll keep for me Yeah, we people on this list just don't get it. So, you're gonna leave the list now, right? Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading files in PHP 5.3.0

2009-09-12 Thread Paul M Foster
On Sat, Sep 12, 2009 at 10:22:10AM -0400, tedd wrote: > At 6:02 PM -0400 9/11/09, Paul M Foster wrote: >> >> I typically use us2.php.net, which is hosted by Hurricane Electric. >> >> Paul > > Paul: > > I wouldn't use Hurricane Electric if their accoun

Re: [PHP] Fixing the path

2009-09-11 Thread Paul M Foster
ectories. Then use relative or fixed pathing as desired from other files that include() those files. If you're using a front controller, then you can use PHP server variables to get the path to that file, and use that as the reference for the location of the other files. (Or maybe I'v

Re: [PHP] get an object property

2009-09-11 Thread Paul M Foster
} > You should use print_r() or var_dump() to investigate what happens when you try to cast an array into an object. I myself don't know what would happen. Also, what's allowed and what effects are produced could depend heavily on the version of PHP you're running. Version 4

Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger

2009-09-11 Thread Paul M Foster
nge the examples on your Google code page to show Javascript errors, and call it a "Javascript debugger". If Formaldehyde is really a debugger for PHP code, then call it a "PHP code debugger". The examples on your Google code page fit this. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] User Account Management

2009-09-11 Thread Paul M Foster
the tables, and you're away. The user's ID and whatever other pertinent information rides along with them in the session variables. Each page checks to see if the user ID in the session variable is allowed to access this page, etc. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Paul M Foster
On Fri, Sep 11, 2009 at 08:38:13AM -0700, Tommy Pham wrote: > --- On Fri, 9/11/09, Paul M Foster wrote: > > > From: Paul M Foster > > Subject: Re: [PHP] Reading files in PHP 5.3.0 > > To: php-general@lists.php.net > > Date: Friday, September 11, 2009, 8:57 AM >

Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Paul M Foster
nd Yahoo hosting of www.php.net). Maybe I > should switch to gmail... I think I'm reading this wrong. Are you saying that php.net is hosted with *Yahoo*? WTF? Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Hoping for a hand with a login script

2009-09-10 Thread Paul M Foster
eigniter. I am still trying to figure out why I > would want to use it. Moreover, I'm using CI right now, and as far as I know, it does *no* user authentication. I had to write my own routines, using their session class to save the user data. Paul -- Paul M. Foster -- PHP General Maili

Re: [PHP] Renaming a Directory

2009-09-09 Thread Paul M Foster
On Wed, Sep 09, 2009 at 12:11:14AM -0400, Eddie Drapkin wrote: > On Wed, Sep 9, 2009 at 12:08 AM, Paul M Foster wrote: > > On Tue, Sep 08, 2009 at 05:39:43PM -0400, Floyd Resler wrote: > > > >> How can I rename a directory with files in it?  The rename function > &

Re: [PHP] Converting URL's to hyperlinks.

2009-09-08 Thread Paul M Foster
... >> >> preg_replace("/([\w\.\-...@[\w\.\-_]+\.\w{2,6})/i", > You can revised your regex to fit to the new kind of email. But it is > smarter to use the right tool (like filter_vars). > > Yeah, I know, I feel like some spanish windmill hunter. I

Re: [PHP] Renaming a Directory

2009-09-08 Thread Paul M Foster
directory. Oddly enough, I can't find a *nix command which will actually rename a directory. The man pages for mv, rename and such all refer only to files, not directories. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] new php script and sqlite

2009-09-08 Thread Paul M Foster
> 2) Should I be using sqlite 2 or 3? Don't use version 2. It's deprecated. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Paul M Foster
ly. So that part is up to you. However, you could set up a loop like this: for ($j = 0; $j < count($msg); $j++) { if (strpos($msg[$i], 'Subject: ') == 0) // got the subject line if (strpos($msg[$i], 'From: ') == 0) // got the From: address line } Parsing the subject line and From: address is up to you. But there are plenty of PHP functions to search and parse strings. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Paul M Foster
as plain text. Your class may be parsing the emails and assigning various parts of them to various class members. But emails are downloaded as a stream of bits, sequentially, top to bottom. Somewhere in the class is a routine which is sucking up that bit stream. At that point, you can capture

Re: [PHP] mail attachment

2009-09-05 Thread Paul M Foster
ut the process is complicated, and the mail() function isn't really set up to do this. I believe the usual suggestion for users who ask this question is to use the phpmailer package. It does this more easily. Google for phpmailer. Paul -- Paul M. Foster -- PHP General Mailing List (http://

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-04 Thread Paul M Foster
On Fri, Sep 04, 2009 at 08:15:41PM -0400, Robert Cummings wrote: > Paul M Foster wrote: >> On Fri, Sep 04, 2009 at 04:22:18PM -0400, Eddie Drapkin wrote: >> >>> On Fri, Sep 4, 2009 at 12:02 PM, Lupus >>> Michaelis wrote: >> >>> if you're

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-04 Thread Paul M Foster
than one). Any time you or someone else would like to backstop me in setting up a dedicated server on rackspace or somewhere else, for free or really cheap, you let me know! Otherwise, those of us with less than complete expertise in server setup are stuck with shared hosting. ;-} Paul -- Pau

Re: [PHP] PHP inserting carriage returns into POST values?

2009-09-04 Thread Paul M Foster
posted contents. You might expect this to be governed by the platform the browser is running on, but no. It inserts CRLF anyway. Like I said, just a clue. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Searching on AlphaNumeric Content Only

2009-09-03 Thread Paul M Foster
he primary key on your table. Have an "extra" field which shows the item number with dashes. You can use this extra field in printing inventory labels or whatever (I don't recall the context of your original post). Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date Comparison

2009-09-03 Thread Paul M Foster
ulated that one should research a question as much as possible before posting to this list. We're not tutors; more like professional side-checkers. (Please don't take this the wrong way, newbies. You're welcome to ask questions here. Just do whatever research you can first, and follow our advice afterward, to RTFM.) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] OO and "Singleton" class

2009-09-01 Thread Paul M Foster
On Tue, Sep 01, 2009 at 06:06:24PM -0400, Eddie Drapkin wrote: > On Tue, Sep 1, 2009 at 5:16 PM, Paul M Foster wrote: > > > > I'm a little fuzzy on some of the PHP implementation details for some > > stuff. In PHP (5 <= phpversion() < 5.3), I'd like a c

Re: [PHP] IRC and English

2009-09-01 Thread Paul M Foster
(a subset of the subset). And *sometimes* I see an "attitude" accompanying the posts (a subset of the subset of the subset). Okay? If your native language is English, the above should have been clear in the first place. And if it's not English, then I've just done you the favor of parsing it for you. (You can send cash to thank me. ;-) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] OO and "Singleton" class

2009-09-01 Thread Paul M Foster
ite = true; elseif (!array_key_exists($index, self::$cfg)) $write = true; if ($write) { self::$cfg[$index] = $value; return true; } else return false; } }; Paul -- Paul M. Foster -- PHP General Mailing List (http://ww

Re: [PHP] Date +30 comparison

2009-09-01 Thread Paul M Foster
; > > > No. Due to Daylight Saving Time, many time zones have two days each > year when the number of seconds in a day is not 86400. This and the "2038" bug are reasons to do this type of calculation with Julian days, as opposed to seconds. Paul -- Paul M. Foster -- PHP Ge

Re: [PHP] IRC and English

2009-08-31 Thread Paul M Foster
On Mon, Aug 31, 2009 at 09:10:54PM -0400, Stephen wrote: > Paul M Foster wrote: >> I'm sorry, but is anyone else annoyed by people who attempt to use IRC >> jargon on mailing lists? For example, substituting "u" for "you". Oddly >> enough, I'

[PHP] IRC and English

2009-08-31 Thread Paul M Foster
d by English so broken I don't even bother trying to decypher it, and sometimes an *attitude* (after which, I blacklist the poster). Am I the only one? It's okay if I am. Just wondering. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] I'm not crazy I swear it... IE vs Safari and Firefox - The impossible!

2009-08-31 Thread Paul M Foster
em paranoid, but Microsoft has done things like this numerous times before. If you are running Windows on the server, try exporting the installation to a Linux server and see if you have the same problem. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Best way to test for form submission?

2009-08-28 Thread Paul M Foster
re that this is not the best/recommended way to do this but I'm > >> hoping someone here will point me in the right direction. > > Two options... > > 1) if (isset($_POST['username'])) // Specific to any given form > > 2) if (count($_POST) > 0) // Just tests whether any data was POSTed FWIW, the CodeIgniter framework uses this latter method internally. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Paul M Foster
iginating SMTP server to pass on the 5xx error as a bounce message to the originator. The fact is that, according to what I know of the RFCs, SMTP servers are supposed to reject bad addresses with a 5xx error during the SMTP conversation, as you describe. But it appears that a lot of servers don&#

Re: [PHP] phpmailer send() always return true even the emailaddress is invalid

2009-08-27 Thread Paul M Foster
On Thu, Aug 27, 2009 at 10:06:03AM -0500, Shawn McKenzie wrote: > Paul M Foster wrote: > > On Thu, Aug 27, 2009 at 09:00:24AM -0400, Bob McConnell wrote: > > > >> The return code only tells you the local server accepted the mail. It is > >> unlikely that server k

Re: [PHP] phpmailer send() always return true even the email address is invalid

2009-08-27 Thread Paul M Foster
a favor to bounce messages to bad addresses. But I got the impression that his view was a minority one. It sounds like you're saying his view has become the majority view. Does your job put you in a position to confirm this with authority? Paul -- Paul M. Foster -- PHP General Mailing Li

Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Paul M Foster
On Thu, Aug 27, 2009 at 02:27:32AM +0800, hack988 hack988 wrote: > this post is away from the point :),but everyone's reply is interesting > > 2009/8/27 Paul M Foster : > > On Wed, Aug 26, 2009 at 09:52:49AM -0700, sono...@fannullone.us wrote: > > > >> >

Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Paul M Foster
On Wed, Aug 26, 2009 at 09:52:49AM -0700, sono...@fannullone.us wrote: > > On Aug 26, 2009, at 9:28 AM, Paul M Foster wrote: > >> and having a great marriage to a woman I can spend hours talking about >> nothing to. > > I'm jealous. Does she have a sister

Re: [PHP] How to output a NULL field?

2009-08-26 Thread Paul M Foster
atabases? My *opinion* is that you should avoid Microsoft products whenever possible. BTW, you can also find books on PHP and PostgreSQL, which, also in my *opinion* is a superior choice over MySQL. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to output a NULL field?

2009-08-26 Thread Paul M Foster
On Thu, Aug 27, 2009 at 12:25:35AM +0800, hack988 hack988 wrote: > I'm sorry for my poor English,what is OP? I don't kown what is OP mean. OP = "Original Poster". That's usually the person who first started (posted) a thread on a list. Paul -- Paul M. Foster

Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Paul M Foster
my own business (and not having to answer to a boss who's an idiot) and having a great marriage to a woman I can spend hours talking about nothing to. Etc. My step-brother is a smart guy. He spends all his waking time trying to figure out how to make more money. He's rich. I don't, and

Re: [PHP] How to output a NULL field?

2009-08-25 Thread Paul M Foster
ng? > > Thanks! Just a thought... do you really mean $rs->Fields(22) or do you mean $rs->Fields[22]? The former is a function call and the latter is an array variable. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] anchor inside form

2009-08-25 Thread Paul M Foster
t; > > href="javascript:document.FormName.submit();" > > > > Cheers > > Arno > > > > > And all it takes for that to break is for someone to turn off > Javascript... > > Thanks, > Ash > http://www.ashleysheridan.co.uk Oh no, here we go again Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What if this code is right ? It worked perfectly for years!!

2009-08-24 Thread Paul M Foster
he mail server, etc. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] inserting php value in html shorter wayand downloading winword & mp3 files the fancy way

2009-08-24 Thread Paul M Foster
l space after $user['fullname']; and before the tag closure (?>). But there's no reason to. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What if this code is right ? It worked perfectly for years!!

2009-08-24 Thread Paul M Foster
change $_REQUEST above to $_POST (assuming POST method on the form), and try it. Also check the return value of the mail() function to see if it thinks it has succeeded or failed. If it fails, check the mail logs on the server to find what the mail server thinks is wrong. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: How to download and configure php mvc website locally

2009-08-21 Thread Paul M Foster
e are either omitted files or missing tables (or missing table rows). Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form Spam

2009-08-20 Thread Paul M Foster
I immediately implement CAPTCHA to block it. This may not block human-generated spam, but human-generated spam is a huge minority because it's so labor-intensive. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing mysql inserts of user data

2009-08-17 Thread Paul M Foster
t's a PHP variable named $user. When you call the execute() function, it puts the values together with their placeholders, forms a complete statement, and sends that off to the MySQL database engine. I haven't followed this thread, so I don't know what you mean by, "I do not see how there could possibly be a prepared statement for a user comment." Maybe someone else can answer that part of your query. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Another date exercise

2009-08-16 Thread Paul M Foster
I *hate* date pickers. They slow down input. I can type 082309 faster than I can ever do it with a date picker. The date class knows I'm in America and since it's a six-digit date, it must be mmddyy. (Yes, for those of you *not* in America, I agree our dates are goofy. I think we all ough

Re: [PHP] Is select_db necessary?

2009-08-11 Thread Paul M Foster
ble. A given database may contain a variety of tables. If you simply start firing SQL commands at a DBMS, it won't know which database to look in unless you tell it. By contrast, the connection process in PostgreSQL must include a database; there is no separate database selection function c

Re: [PHP] Calendar Problem

2009-08-11 Thread Paul M Foster
21, Aug > 28, and Sept 4. > > I'm curious, how would you guys solve this? Convert to julian days, then add or subtract days as desired. Then convert back to gregorian. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Paul M Foster
do this. It's quick and simple: > > CSS: > .dataRow1 { background-color: #DFDFDF; } > .dataRow2 { background-color: #FF; } > > foreach ($foo_array as $foo) { >?>"> ?> } NO! For the love of God and all that is holy, don't do that ">

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Paul M Foster
gt; probably worth it. Now if only I could get into the habit myself... This is common practice for a lot of C programmers for exactly this reason. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Paul M Foster
On Tue, Aug 04, 2009 at 06:10:30PM -0400, HallMarc Websites wrote: > [HallMarc Websites] > > God I love this planet. I agree with Paul. > Yeah, great planet, this. A little touristy, but still a good travel value. ;-} Paul -- Paul M. Foster -- PHP General Mailin

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Paul M Foster
denigrate your abilities. You may be a very nice person, and quite talented at doing the things you're trained to do. But programming in PHP is apparently not one of them. And if you're going to be doing this for a living, then you're going to have to either stop doing this for a living, or actually study the subject. Because sooner or later, no one here will listen, no matter how nice you are, and no matter how well you do the other parts of your job. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Dan Brown

2009-08-03 Thread Paul M Foster
hter to pieces until she gets to puberty. Then take your wife and leave the country, no forwarding address. "Haileigh who?" ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Dan Brown

2009-08-03 Thread Paul M Foster
know about their space limits. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP programming strategy

2009-08-01 Thread Paul M Foster
oading the production version give any visible > improvement in > performance? > I bow to those who have profiled this, as far as performance goes. However, remember, you have to *maintain* this code. In a trade-off between performance and maintainability, I'd opt for maintainabi

Re: [PHP] Script to Compare Database Structures

2009-07-31 Thread Paul M Foster
n_default, is_nullable, character_maximum_length, numeric_precision, numeric_scale FROM information_schema.columns WHERE table_name = 'tablename' ORDER BY ordinal_position This will not tell you the relations between tables, nor which columns are primary keys, etc. There may be another way to

Re: [PHP] Can a range be passed to a query?

2009-07-31 Thread Paul M Foster
ECT DISTINCT ... LIKE 'Array'" Try this: $values = implode(',', $other); $sql = "SELECT DISTINCT ... LIKE '$values'"; (See documentation for implode().) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-29 Thread Paul M Foster
c. FWIW, my copy of this file is in /usr/share/misc/file/magic, which is where the man page says it should be. Debian Linux v5. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Paul M Foster
original code had two problems. First, you're getting the error message because you're allowing E_NOTICE level error messages. You can turn these off with the error_reporting() function. Second, as written, your page paints the form and then directly tests the status of the variables before the user can respond; the whole page of PHP code executes and then waits for user response. It's only when the user responds and the page is revisited that the variables can legitimately be tested. That's why Richard's method works. The variables are only tested when the page is re-entered after the user responds. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] JS alert that links to a file

2009-07-26 Thread Paul M Foster
way to trigger this from PHP, since PHP is server-side and Javascript is client-side. You might be able to have javascript scan for the existence/closing of the file in question and then alert the user. Or you could have PHP, when the file is complete, launch a new page which contains the javascript

Re: [PHP] This is the kind of [expletives deleted] answer that iscertain to prevent bugs being reported.

2009-07-25 Thread Paul M Foster
is to honor the environment locale settings. Having to set the locale within a CLI is silly and counterintuitive with respect to *nix applications. I can't speak for Windows here. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mediawiki's url confusion

2009-07-23 Thread Paul M Foster
ectories and index.php is not a directory. The lookback feature can be turned on in the Apache configuration file, which, on a public server, you have no access to. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Structure of PHP files

2009-07-23 Thread Paul M Foster
150k file. What happens to it afterward (compiling, compressing, caching, whatever) is another issue. You've still loaded 150k of code. The question is whether you actually need to load 150k of code from the start. If not, why waste the resources? Paul -- Paul M. Foster -- PHP General Ma

Re: [PHP] Mediawiki's url confusion

2009-07-22 Thread Paul M Foster
of a site. URLs like this often take advantage of an Apache feature called "mod_rewrite", which tells Apache how to handle URLs which look like this. You can look on wikipedia.org for these terms or google for them, and find full explanations. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to build an FF extension

2009-07-22 Thread Paul M Foster
n a PHP list, which isn't the appropriate venue for such a question. Firefox/Mozilla lists would be a better place to ask. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] newbie - Is there a calendar module for date entry?

2009-07-22 Thread Paul M Foster
ich will reach their capacity, I believe, in 2038. (We'll probably all have 64 bit machines by then.) Thus, the class generally doesn't consult Unix timestamps This makes duration and date calculations simple. If you like, I can email you the class privately. Store times as a separate fi

Re: [PHP] Converting SQL Dialects

2009-07-21 Thread Paul M Foster
t from one to the > other, rather than leave it to a machine. How complex are the queries > that you are trying to convert anyway? I have to agree with Ash here. I was a FoxPro 2.6a DOS programmer (just at the beginning of VFP). We hired a programmer who did a lot of his queries in FoxPro's crippled version of SQL, but the rest of us just used regular FoxPro for queries. Remembering what FoxPro SQL was like, and now having worked with MySQL and PostgreSQL, I wouldn't wish the conversion of one SQL dialect to another on anyone. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Newbie: Composition by Association - Pagination Class general question.

2009-07-19 Thread Paul M Foster
ew". So in your constellation of software, would you create a subclass of genericTable which essentially is a "view"? Otherwise, how would you handle this? Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why does PHP parse "*.html" files in one subdir/ but not in another?

2009-07-19 Thread Paul M Foster
On Sun, Jul 19, 2009 at 07:18:34PM +0100, Stuart wrote: > 2009/7/19 Paul M Foster : > > On Sun, Jul 19, 2009 at 09:30:33AM +0530, kranthi wrote: > > > >> > >> > You do realize that PHP does not parse HTML files, right? The web server > >> > does tha

Re: [PHP] PHP and FoxPro

2009-07-19 Thread Paul M Foster
greSQL or MySQL? FoxPro is ancient and decrepit (I used to code in FoxPro). There is a dBase module for PHP. I don't know if it handles generic xBase files. I don't know much about the module, but you could check it out. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.p

Re: [PHP] why does PHP parse "*.html" files in one subdir/ but not in another?

2009-07-19 Thread Paul M Foster
on-PHP text to the browser, which is not parsing it. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why does PHP parse "*.html" files in one subdir/ but not in another?

2009-07-18 Thread Paul M Foster
e HTML files, right? The web server does that. In fact, the web server also parses PHP files, using a different library. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Back from the dead with a racing question!

2009-07-17 Thread Paul M Foster
added a record yesterday, that's a different story, but should not allow race conditions. A good database engine should protect you in this area. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Add php.net to my browser search box

2009-07-17 Thread Paul M Foster
On Thu, Jul 16, 2009 at 12:59:00PM -0300, Martin Scotta wrote: > Hi all! > > I'd like to add php.net to my browser search box. Gee, I just keep a tab open to php.net at all times. Just like having "Programming PHP" on my desk at all times. Paul -- Paul M. Foster

[PHP] Error handling

2009-07-15 Thread Paul M Foster
called. So if I set up an error handler function like: function my_error_handler() { switch ($errno) { case E_ERROR: die('Something or other'); break; ... } } the parts which reference errors like those above won't actually execute?

Re: [PHP] phpscriptor.com

2009-07-12 Thread Paul M Foster
out > of it. So for, lets say 200 dollar, you can have to domainname. And if you > want, you get the website free with it. You don't want to make a profit, yet you're selling it for $200? Those two statements are contradictory. Paul -- Paul M. Foster -- PHP General Mailing Li

<    1   2   3   4   5   6   7   8   >