ing the input easier in Perl or
Python, where you don't have to deal with variable initialization as
much. And both also have APIs for MySQL and PostgreSQL. And I believe
both DBMSes can handle databases of this size.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ntation for ltrim():
http://us2.php.net/manual/en/function.ltrim.php
The string you're including as the second parameter to ltrim() is the
*characters* you want to trim on, not the *character pattern*. If you
think about it that way, it will make sense. Also one of the examples on
the r
date('m',$nowts-(86400*180))."/1/".date('y',$nowts-(86400*180));
>
> Q: Any ideas how to fix this issue? (please try to keep it simple - 'cause I
> ain't no math wiz either)
>
Here is working code to do it better:
// get your starting date
$darray = getdate();
$month = $darray['mon'];
$year = $darray['year'];
// create your months
$dt = array();
for ($i = $month; $i >= 1; $i--) {
$dt[] = date('m/d/y', mktime(0, 0, 0, $i, 1, $year));
}
$year--;
for ($i = 12; $i > $month; $i--) {
$dt[] = date('m/d/y', mktime(0, 0, 0, $i, 1, $year));
}
// print the dates, just as a check
for ($i = 0; $i < count($dt); $i++) {
print $dt[$i] . "\n";
}
This gives you a decending array from the current 1st of the month to
twelve months prior. The $dt array has mm/dd/yy date strings in it.
Change as needed.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s but a) I hate wikis and b) they don't
> match up 100%
Out of curiosity, why do you dislike wikis?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ew product
// $count will be the number of a given product
$product = $a['name'];
}
else {
$count++;
// print out whatever you need to
}
}
If anyone knows a better way to do this with just SQL, I'm interested.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
other hand, CRC, by
design will reliably detect subtle changes to a message/file.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
() function, but instead use the OO version:
$pdf = new pdflib();
All this assumes that the PDFLib extension is actually installed. The
documentation at php.net is a little confusing about whether this is an
actual extension or not. Personally, I just install the add-on for this.
Paul
--
Paul M. Fo
/misreading something?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and you're supposed to teach him how to cook like you do.
Every time he cuts a shallot or dices an onion, he asks you a bunch of
silly questions he should know if he had gone to culinary school like
you did. You're busy. And the questions are things like "What's the
difference between a teaspoon and a tablespoon?". "How come I have to
dice onions? Can't I just throw them in the pot?" And you know that the
only reason the kid is there is so he can learn to cook some stuff to
impress his girlfriend, who's gonna dump him in three months anyway.
Think about it.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, Mar 16, 2009 at 05:57:13PM -0700, revDAVE wrote:
> On 3/14/2009 9:31 PM, "Paul M Foster" wrote:
>
> >
> > I'm not an expert, but the way I normally do something like this is with
> > a join that would give name, model and condition on each row (so
On Mon, Mar 16, 2009 at 06:05:33PM -0500, PJ wrote:
> Paul M Foster wrote:
> Thanks Paul for the explanation. It really does help and iis much
> appreciated.
>
> I must respond to your chastisement of me, because i believe you may not
> be aware of the fact that most bo
given the timestamps you got.
Be careful in feeding values to mktime(). If your week spans a
month or year boundary, you'll need to compensate for it when giving
mktime() month numbers, day numbers and year numbers.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote:
> From: Paul M Foster
>
> You also need to be aware that on 32 bit Unix and Linux systems the
> behavior of mktime() on dates after Jan 18, 2038 is undefined. The 32
> bit counter overflows early on the 19th, so any
On Wed, Mar 18, 2009 at 12:57:39PM -0400, Bob McConnell wrote:
> From: Paul M Foster
> > On Wed, Mar 18, 2009 at 11:46:31AM -0400, Bob McConnell wrote:
> >>
> >>> You also need to be aware that on 32 bit Unix and Linux systems the
> >> behavior of
s form is re-entrant (displays 4 lines, user hits "Done" and it
displays 5 lines, etc.), then you're going to have to save the $cnt
value in the $_POST array. Then you do something like:
"/>
Your question is a little unclear, so I may be misunderstanding what you
want.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Slightly OT, but here's the question. Normally when a form paints, the
cursor isn't in any particular field. If you want to have the cursor
show up in a particular field, how do you do that? I knew at one time
and now can't find how it's done.
Paul
--
Paul M. Foster
--
nt programmer. And
I've rarely seen estimates come in on the button. And my experience with
customers defining their requirements is that, as the vendor, I have to
do most of the work. My company does logos as well and if you think
website requirements are hard to define, you have no idea. Logos a
edly trained to do.
But people were sure impressed by all the initials.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
g up, and use it myself
from time to time. Now, I'm from the South, and you're up North, so
maybe that's the difference.
>
> I guess it the old "Same difference between a telephone pole because
> motorcycles don't have windows" sort of thing. Everyone my age (those
> who are left) have heard of that.
Never heard that one.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e out. But you
can do unset($_SESSION['myvar']) to unset a particular variable at any
time (assuming you have previously called session_start()).
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> The name attribute is where you want the [] to post an array, ID does not
>> get sent in a post.
>
>
> Correction -- name is Ok and where you should put the [].
>
> The demo is here:
>
> http://www.webbytedd.com/bbb/check-box-form/
>
> It works, shows why and how y
mean ".rtf", as in Rich Text Format? If
misspelled that way, it could explain the problem.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
question, but why not do this over
YouTube or some site like that? There are no bandwidth limitations, you
can make videos private, etc.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t; GoDaddy.
http://nodaddy.com
I know a bunch of engineers at the company which hosts my LUG's lists
and website. These guys are UBERgeeks. At one time they recommended
GoDaddy, but no more. These guys register and maintain many many more
domains than I ever will. I trust their judgmen
etc.
What might be the liabilities of something like that? Would there be
security issues? Would there be increased difficulty in debugging? What
can you think of?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Apr 10, 2009 at 09:01:14AM -0400, Bob McConnell wrote:
> From: Paul M Foster
> >
> > Here's a hairbrained idea I was kicking around. I object to the idea
> of
> > including 15 or 30 files in a PHP application just to display one page
> > on the intern
ke him
sign), he could still go after you later when the consequences hit. Let
some less ethical coder do it the way he wants.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ing the site once had.
This is a really good point. I've *always* heard/read that ugly URLs
aren't indexed by search engines. But somehow it never occurred to me
that what you're saying about search engine results is true.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
n, but the
fact that PHP isn't finding it in the first place leads me to believe it
isn't there. If that's the case, I'd suggest you make up your own alt()
function that does what you think this one is doing (maybe just return
the passed variable). You'll have to decide whe
ly fast or faster because you can get various pieces of
the file from various peers or servers on the internet, simultaneously.
I don't expect that people uploading their private photos of their
girlfriends want them shared in any way, except with the eventual
recipient.
Paul
--
Paul
a function, there is no way to access that
variable outside that function. You can pass it back as a return value
from the original function, or make it global (not advised) to make it
visible in other functions.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, it's necessary to put endless
if/else pairs in the function. That makes it hard to read the source.
I'm sure there are purists out there who would insist the single return
go at the end. But expediency and readability may dictate otherwise.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
years.
>>
>> --
>> Tony Marston
>
> Tony:
>
> Don't get your panties in a knot. :-)
I think in Tony's case, it would "knickers in a twist". ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a bunch of
someone else's PHP code I'd like to modify, but it's coded the wrong
way, so I'd like to fix it.
(I'm teasing you CamelCase people. But I really would like to change
this code around, because it doesn't happen to be my preference.)
Paul
--
Paul M. Foster
ed to convince someone (a prospect) you could
do something, this site would do it. Next time I talk to a prospect, I'm
gonna call myself Tedd and refer them to this site. ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
mething (yes, I know the singleton pattern can
be used; I do use it as well; it's more complicated)?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-/
My French is rusty, but it looks like it says something like "I'm out of
the office". So it would appear this person has an autoreply
going.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ame way in all of
them really helps. The lack of semicolon line endings in Python drives
me nuts. Perhaps worse, Python has no switch/case construct. For some
reason van Rossum eschewed this in favor of if/else/elif. Ugh.
Ultimately, it's Tedd's choice, and if the code works, it works. I just
wouldn't do it that way. I agree with Robert-- if I saw code like this I
had to maintain, I'd be slightly miffed.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
bscribed,
learn email netiquette on lists, etc.
It reminds me of people who call tech support saying their mouse doesn't
work. Then you find out they've picked it up and pointed it at the
screen to make the pointer move (true story).
If you're going to own a car, learn how to drive it.
ntheses with
an echo command" guys. I'm sooo disappointed!
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of some
CD-writing software on the CD, since there may not be such software on
the client machine. And all this assumes the user is running Windows.
The binaries for one OS won't run on a different OS.
Now, watch. Someone will get on and say, "Oh sure, you can do that with
such-and-such
On Fri, May 15, 2009 at 10:21:22AM +0100, Peter Ford wrote:
> Matt Graham wrote:
> > Ashley Sheridan wrote:
> >> Paul M Foster wrote:
> >>> On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote:
> >>>> One of the things the other company said w
to use nl2br() to translate for HTML. It also may be that you need
to do a translation from CR/LF (textarea line ending) to LF (*nix line
ending). The CR/LF *will* show up properly when *editing* in the
textarea field, just not when displayed without a textarea.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
newlines when it displays text. The tag
maintains the formatting of your original text, including newlines.
Unfortunately, it also displays text in a monospace font.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
dard. In fact, browsers typically fail to
support existing standards fully.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ople who actually go and see movies. The critics inevitably have
all sorts of snobby things to say about the movies which are best
attended. I'm not sure why anyone listens to any critic on any subject.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ng.
>
> Laws that force them to meet certain standards forces them to hire
> someone who knows what they are doing.
Are you the same guy who was lobbying for the licensing of PHP/HTML
programmers? Argh.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
p://programphp.com/Calendar/
>
> all sizes etc are in em so it'll fully resize - you'll see in the source
> anyways - all css.
>
> have to say it's not great but it's just a quick demo to show it's more
> than possible.
It's very pretty, Nathan. *Except* in
On Sun, May 17, 2009 at 11:20:19PM +0100, Nathan Rixham wrote:
> Paul M Foster wrote:
>> On Sun, May 17, 2009 at 08:40:33PM +0100, Nathan Rixham wrote:
>>
>>> tedd wrote:
>>>> At 11:28 PM +0100 5/15/09, Nathan Rixham wrote:
>>>>> tedd wrot
>
> Can some one educate me on this point.
According to my Visibone cheatsheet, the attributes you're talking about
are "unimplemented W3C features".
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the same behaviour of Python in PHP, do you think
> that it is possible?
Set your error reporting higher:
error_reporting(E_ALL);
at the top of your script.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ult. Oh, and you had to pay ANSI or whoever $90
for the standard on whatever document (purchase order, invoice, bill of
lading) you wanted to deal with. A mixed bag, for sure.
When they dreamed up XML, I wish they'd also set up a standards body or
process for standardizing tags and attributes.
" in your browser. It's all there
for you to peruse. Of course, this assumes a fair knowledge of CSS,
which you would have to obtain elsewhere. (Although, I have to say, this
example goes pretty far in illustrating how CSS works.)
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s a pathing problem in the inc.php script. Make a copy
of the query.sql file and put it in the includes directory. Test. Make a
copy and put it in the document root. Test. At some point it will work,
and you'll know where inc.php expects to find it. Then you can work out
why it expects that. Then you'll grasp the "quirk".
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, May 18, 2009 at 04:43:20PM -0700, Michael A. Peters wrote:
> Paul M Foster wrote:
>
>>
>> That's the same problem XML has. The original idea was that you could,
>> for example, have an invoice, and because it was marked up with the
>> appropriate tags, e
as to be a form if you do this. When you check the form, look
for $_POST['mixer'] == 'ordered_mixer'. If that relation is true, the
user left the box checked. If it's not true, the user unchecked the box.
Don't hold me to this. Do an experiment and see if that doesn
sks you
about all the fields you want, and then generates the code to paint the
form. There are commercial solutions which do this, and some (not that
great) free solutions. I'm working on one myself, which will eventually
be a sourceforge/freshmeat project.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, May 20, 2009 at 05:10:57PM +0200, Angelo Zanetti wrote:
>
>
> -Original Message-
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: 20 May 2009 16:09
> To: php-general@lists.php.net
> Subject: Re: [PHP] Forms validation and creation- easier solut
gt; popup security message from Adobe about the application trying to
> automatically print.
>
> >From the searches I did, you cannot disable or bypass this warning
> notification.
I can't find anything like this in FPDF 1.53 or in the documentation for
version 1.60. I'd
your HTML page properly. PHP is generally interspersed with
HTML to do the things that PHP can do and HTML can't.
Your questions indicate you don't understand how PHP works, and the way
PHP integrates with HTML. If you don't have a background in programming
in general, you've got
you're doing. In fact, if styles were turned off, putting them in tables
would have them still display properly.
But for the record, this was good work. They look nice. ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, May 22, 2009 at 04:56:01AM -0300, Manuel Lemos wrote:
> Hello,
>
> on 05/20/2009 11:09 AM Paul M Foster said the following:
> > Both this class and Manuel Lemos' form generation class (from
> > phpclasses.org) will create beautiful forms for you. However, you ma
readsheet-like interface for
databases. This could have saved endless trouble, since for lack of
this, people store database information in spreadsheets. And then wonder
why they can't do this or that with it. Argh.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
== comparisons. And empty()
has a really wild way of determining if something is "empty" (an integer
0 is "empty"?). Which is why I originally asked if strcmp() was the
preferred method of comparison for the list members.
In any case, strcmp() does what you want and is the safe
a few days of work setting up configuring and
> exploring.
>
> Servers & Bandwidth courtesy of Dan Brown @ Parasane - thanks mate.
> http://parasane.net/
>
> Hope it helps somebody!
That's no development environment! There's no Vim! ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
les customers, invoices, payables,
statistics, mailing lists, payroll, pricing, a calendar, and several
other areas for my business.
Others will doubtless argue about how I've done this. There are about as
many opinions about how all this should be done as there are developers.
I'm just giving you advice on how I've done it. Feel free to ask other
questions.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, Jun 02, 2009 at 03:49:03PM +0100, Tony Marston wrote:
>
> "Paul M Foster" wrote in message
> news:20090602134327.gk14...@quillandmouse.com...
> > On Tue, Jun 02, 2009 at 02:50:36PM +1000, Angus Mann wrote:
> >
> I would advise against this as hidd
test and be penalized if I don't take it.
If I didn't have to take credit cards to stay in business, I'd tell the
credit card companies to go pound sand.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e which puts the record you want at the bottom of the
array you get from SELECT. Count the records in the obtained SELECT
array, and take the last of these records.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
10:10:30)
> >
> > i have tried select top 1 from table where id = xx
> > any solution
> > --
> > www.bemycandy.com
> >
>
>
> select top 1 from table where id = xx order by date_field desc
What database(s) support a "TOP" clause in SELECT
On Tue, Jun 02, 2009 at 12:33:24PM -0400, Andrew Ballard wrote:
> On Tue, Jun 2, 2009 at 12:17 PM, Paul M Foster
> wrote:
> > On Tue, Jun 02, 2009 at 04:49:44PM +0100, HELP! wrote:
> >
> >> Hi,
> >>
> >> how do you select the most recent row fr
that much. Any database should do
pretty much whatever you ask of it. You can't actually go wrong with any
database. Your choice of database will mostly affect two things: 1) how
much work you have to do that the database won't do for you, and 2)
expense.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rver but does not forward on the actual
> website
>
> Any way to fix this?
>
>
>
> Home is php 5
>
> Server (not sure) might not be 5 - maybe v4
>
> Could that be the problem?
>
If I ever have a redirect like this, I *always* put after it:
exit(
cket ([) which indicates the beginning of a character
grouping or class. The next character, the caret (^) indicates negation.
So that expression means that anything which doesn't match these
characters gets whatever the next parameter is.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Jun 03, 2009 at 07:57:32PM +0100, Ashley Sheridan wrote:
> A single-phase Caesar cypher is by far the best. It worked for Julias
> Caesar, and damn it, it will work for us!
ROT13 FTW!
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
;> Best,
>> Michael
>>
>
> gnuplot may be what you want - but it doesn't have php bindings as far
> as I know, so you'll have to call it via a system call.
I use Gnuplot every week to graph the statistics of my business. It's
extremely flexible, and will output
On Thu, Jun 04, 2009 at 09:17:07PM -0700, Michael A. Peters wrote:
> Paul M Foster wrote:
>> On Thu, Jun 04, 2009 at 01:50:28PM -0700, Michael A. Peters wrote:
>>
>>> li...@mgreg.com wrote:
>>>> Hi All,
>>>>
>>>> I'm currently
uction application.
I've coded a bit in Python, and parts of it really annoy me. I much
prefer PHP, as it's more C-ish.
Why wouldn't you use PHP for production applications?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if so, or
fetches it if not.
But if a page is populated with variables from a database (for example)
which could change from time to time, how could a caching engine
possibly cache it? How would it determine whether to re-fetch the page
or use the cached version?
Paul
--
Paul M. Foster
--
P
GUI apps. But I haven't heard a really
compelling reason yet for *not* using PHP.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
re. And
generally, there are typical ways that humans think about accomplishing
programming tasks, which are reflected in the way that humans design
programming languages.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
seems a
> little
> > limiting tbh, and as my site contains code, it's not unreasonable to
> > expect some people might want to search for particular code excerpts.
>
> What if we don't use MySQL? We are using Postgres on our web servers.
> None of the MySQL libraries are available. I am currently reviewing a
> half-dozen different and incomplete black-list sanitization functions
> that don't to a very good job while removing characters that we need to
> be able to use. I need to identify a clean strategy to replace or
> restructure them.
PostgreSQL has a function called pg_escape_string() which probably
performs a function similar to MySQL's function. See
http://us2.php.net/manual/en/function.pg-escape-string.php
But you'll still need other functions (as above in this thread) to do a
thorough job.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t;
> $a = array( 'apple', 'banana', 'grape', 'orange' );
> $b = array( 100, 2111, 198, 150 );
> $c = array( 'red', 'yellow', 'purple', 'orange' );
> $d = array( 100, 300, 11, 50 );
>
> $arrays = array(
men in the Avacado Jungle of
Death.
Yep, insane.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
"The
Toxic Avenger", but with an even lower budget. Priceless! ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> Absolute rubbish -- as it says at http://php.net/empty, "empty($var) is
> > the opposite of (boolean)$var, except that no warning is generated when
> > the variable is not set." -- so "protecting" empty() with an isset() is
> > a total waste of time, s
On Sat, Jun 20, 2009 at 12:20:56PM +0100, Ashley Sheridan wrote:
> On Sat, 2009-06-20 at 00:19 -0400, Paul M Foster wrote:
> > On Fri, Jun 19, 2009 at 07:52:40PM +0100, Ashley Sheridan wrote:
> >
> > > On Fri, 2009-06-19 at 12:36 +0100, Ford, Mike wrote:
> > &
for your site).
Upon login, you could perform a query of the table(s), looking for the
number of records where the logout field is empty.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Jun 24, 2009 at 05:26:11PM -0400, Daniel Brown wrote:
> On Wed, Jun 24, 2009 at 17:19, Michael A. Peters wrote:
> >
> > Jane, a non technical person [...]
> >
> > Betty's webmail account is compromised [...]
>
> Bottom line: hax0r5 hate g1rls.
O
more trouble than it
> was worth to fix. Besides, what does the user need to see while an
> operation is underway?
I like the last one (#39). Perfect for a "progress bar". ;-}
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>> in Iran.
> >
> > i don't know why you'd think that. the story is all over the news. american
> > pols have been exploiting it. cnn reports cia hay have been behind the
> > shooting.
>
> OT is one thing, fellas, but politics is another. Please
sses.
Why would a singleton lead to headaches?
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
st,
use an editor which does search-and-replace efficiently. Second, set up
a function which is called wherever you have $abort_now currently. For
the moment, have that function simply check the $abort_now variable. In
the future, you could have it do something else, but not have to change
your existing code.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
on engines have no way of doing it on their own.
(Oh, there may be a way to do this with Javascript. I'm not good with
Javascript, but maybe there's some "OnExit" event which you could use to
cause a Javascript function to do an AJAX call to a PHP script which
cleans up. I
On Tue, Jun 30, 2009 at 11:21:03PM -0400, Phpster wrote:
> On Jun 30, 2009, at 10:48 PM, Paul M Foster
> wrote:
>
>>
>> FWIW, I've had to do this exact thing with regard to form validation,
>> except I'm not looping. Check each condition, and if it fails,
some way to solve this.
>
I had an error something like this when using FPDF. It would hack up the
second PDF. I didn't investigate it a lot, but my solution was to
instantiate the class *once*, and loop on the *rest* of it.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ant.
That is, the data returned from authenticate.php would be processed by
authenticate.php. You'd need to put a branch in authenticate.php to
determine if this is a fresh invocation of the file, or if the user is
returning data to you. The second time through, you check the returned
values
l that in any file in the root of *your* web directories, and you
have what is essentially the "document root" for *your* site.
Presumably, you know the *relative* directories of all your files.
Simply append those relative directories + filenames to the $site_root
variable, and you
;m not recommending
osCommerce per se (I think it's currently not well maintained), but it
stands to reason that other similar ecommerce suites would allow the
same capability.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
7;m not sure it will understand binary
data in your file (like floats). Also look at pack() and unpack(), as
these will, to some extent, read and write binary values.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
101 - 200 of 706 matches
Mail list logo