RE: [PHP] display error line in object method

2005-08-10 Thread Mike Johnson
re isn't, necessarily. That was pseudo-code to demonstrate what I thought you were asking about. The point of my reply was "I don't think it's possible to do what you want to do here," and offer up an alternative in passing __LINE__ as an argument to error(). Good luck! -

RE: [PHP] display error line in object method

2005-08-10 Thread Mike Johnson
y be to pass __LINE__ as an arg to error() and use it there as you please. I don't know of any $parent::__LINE__ syntax, which is what it sounds like you're asking about... -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECT

RE: [PHP] PHP error on form

2005-07-28 Thread Mike Johnson
ct_Form > _test.php > on line 58 > > the above code is just the php form part of the page not the entire > code, so it would be impossible to determine line 58, but I was hoping > someone would be able to spot the problem or at least explain the > error to a relative newbie.

RE: [PHP] preg_match - help please

2005-07-27 Thread Mike Johnson
From: André Medeiros [mailto:[EMAIL PROTECTED] > On Wed, 2005-07-27 at 11:41 -0400, Mike Johnson wrote: > > From: André Medeiros [mailto:[EMAIL PROTECTED] > > > > > On Wed, 2005-07-27 at 16:16 +0100, Mark Rees wrote: > > > > > > > Or even four

RE: [PHP] preg_match - help please

2005-07-27 Thread Mike Johnson
> > well as ' as in John O'Kane > > > > Yeah, that's why strpos will make his life much easier :) Can you explain how you'd use strpos() in this situation? I was going to ask earlier, but didn't bother, but now I'm curious... -- Mike Johnson

RE: [PHP] Help with a home-grown function

2005-07-21 Thread Mike Johnson
that sometimes the function does not > return 1, even when it should. > > I was hoping some experienced eyes could take a gander at > this and give me some pointers. PHP doesn't eval code in single-quotes, so what you want to do is simply: if (empty($workingArray[$i]))

RE: [PHP] error when trying to delete a record

2005-07-11 Thread Mike Johnson
probably best to check if it's empty, something such as: if (!empty($id)) { $query = 'DELETE FROM sheet1 WHERE id = ' . (int)$id; } else { echo 'Argument $id was empty'; } HTH! -- Mike Johnson Smarter Living, Inc. Web Developer

RE: [PHP] Problem with arrays

2005-06-24 Thread Mike Johnson
your help In this specific example, I think this would work: That's not terribly flexible, though. Is this used in a more generalized sense, or is it just this specific instance? -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] form inside an email

2005-06-14 Thread Mike Johnson
flag. If you're mailing to a large group or to certain domains/spam handlers, you may easily get flagged for bulk mail. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mailing List (http://www.ph

RE: [PHP] calling a derived static method from a base class

2005-05-05 Thread Mike Johnson
::g(); } static function g() { print("Base\n"); } } class Derived extends Base { static function g() { print("Derived\n"); } } Derived::f('Derived'); Not sure if this is what you're looking for

RE: [PHP] Notice: Undefined index

2005-04-28 Thread Mike Johnson
gt; That's correct behavior. As you're simply running action.php on its own, it sees that $_POST['name'] and $_POST['age'] don't exist and outputs a notice for each. To avoid the notices, ensure that those keys exist before calling something like echo on them:

RE: [PHP] Insert Chars into a string

2005-04-14 Thread Mike Johnson
From: Mike Johnson [mailto:[EMAIL PROTECTED] > From: PartyPosters [mailto:[EMAIL PROTECTED] > > > Hello, > > I have a variable that contains a filename, I want to be able > > to insert the date and time just before for the ".jpg" > > for example if my

RE: [PHP] Insert Chars into a string

2005-04-14 Thread Mike Johnson
to be human-readable, might I suggest date('U')? It's the number of seconds since the epoch; it's easily convertable to human-readable format. If that doesn't fly, perhaps MySQL's datetime format, which is a 14-digit int, achievable with date('

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] RE: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] Résultats sur plusieurs pages

2005-03-22 Thread Mike Johnson
LIMIT 100,10; Le premiere retourne resultant zero a dix, le seconde retourne onze a vingt, et le deniere retourne resultant cent a cent-dix. J'espere que ceci aide, et ma Francaise et intelligible! Bonne chance! -- Mike Johnson Smarter Living, Inc. Web Developerw

RE: [PHP] cache class

2005-03-22 Thread Mike Johnson
k the obvious question, but are you editing the right file and/or saving it to the right place? I only ask because I've done that so many times it's not funny. :) -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED

RE: [PHP] User Passwords: checking for unique chars

2005-02-14 Thread Mike Johnson
t; regular expressions this morning so I'm no expert on them... The quick & dirty way, I think, would be the following: I'm curious to see if there's an easier way to do it, though. I'm not sure regexps are the answer. -- Mike Johnson Smarter Living, In

RE: [PHP] How do you read one of these parameters?

2005-02-11 Thread Mike Johnson
ocs/misc/FAQ.html#rewrite-more-config This is Apache-specific, but I'd imagine there are similar methods for other webservers. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mail

RE: AW: [PHP] Student Suspended Over PHP use.[Incredibly OT]

2005-02-10 Thread Mike Johnson
ad this list daily and, while I may skip some messages, I've never seen anything about any group like what you posted earlier. Do tell, I'm curious. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- PH

RE: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Mike Johnson
TP_POST_FILES; See here for more info: http://us3.php.net/manual/en/reserved.variables.php#reserved.variables.f iles Hope this helps! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smartertravel.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mail

RE: [PHP] [Fwd: DNS.050125191312.29782 (Re: Re: [PHP] Replace credit card numbers with X ???)]

2005-01-25 Thread Mike Johnson
nnoying, no? > > Best regards, > > Richard Davey My personal favorite is when someone requests a read receipt on listmail. I wonder what their inbox looks like when 500 people send one back all in the space of five minutes. -- Mike Johnson Smarter Living, Inc. Web Developer

RE: [PHP] variable hell

2005-01-04 Thread Mike Johnson
ociative arrays. $x = 'products'; $issorttext[$x] = 150; $isnewsorttext[$x] = 350; $iscount[$x] = 50; $isnewcount[$x] = 20; After this, you'd end up with four arrays of one key each ('products'), referenced as such:

RE: [PHP] cURL and line breaks

2004-12-29 Thread Mike Johnson
e. I didn't get to do much debugging as I was in a hurry. I just wanted to toss this one out there and see if it was a known issue I'd missed in Google. I doubted it, but figured it was worth a shot. -- Mike Johnson Smarter Living, Inc. Web Developerwww.smart

[PHP] cURL and line breaks

2004-12-28 Thread Mike Johnson
anyone ever run into something like this, though? I Googled to no avail... -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] gallery (4 in a row) // carefull newbie

2004-12-28 Thread Mike Johnson
middle of a row and fill with N empty tags. Also, if there's a better way to do this, I'm all ears. This is the way I've done it for years, but it /is/ a pain to do. Anyway, HTH! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EM

RE: [PHP] Date Conversions?

2004-11-15 Thread Mike Johnson
d-%y') AS date_format_1, DATE_FORMAT(date_field, '%M %e, %y') AS date_format_2... HTH! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: probably stupid, but...

2004-11-12 Thread Mike Johnson
t); > > And it still is producing an empty page (not even echoing out > the $addtocart variable) when I run it. If this is just a snippet and you do close that if clause with a curly brace later in the code, my guess is that the parser doesn't like the $_POST['book_title_'

RE: [PHP] What am I doing wrong - PHP

2004-11-12 Thread Mike Johnson
at, I'm not certain the code is exactly what you want, but this should at least solve the blank page problem. I think PHP's barfing on that but errors aren't being written to the browser. Good luck! -- Mike Johnson Smarter Living, Inc. Web Developerwww.smarterliving.com [EMAIL PROTECTED] (617) 886-5539 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php