This one time, at band camp, "Leon du Plessis" wrote:
> I used that notation before, and it did not work 100%.
> Adapt as follows:
>
> for ($i = 'a'; $i <= 'z'; $i++)
> if ($i == "aa") break; else echo $i;
>
foreach(range('a', 'z') as $letter ) { echo $letter; }
Kevin
--
PHP General
2009/1/15 tedd :
> At 9:46 AM -0800 1/15/09, Chris Carter wrote:
>
> Chris:
>
> That's not the way I would do it. After establishing a connection with the
> database, I would use the query:
>
> $query "SELECT email FROM owners WHERE email = '$emailAddress' ":
> $result = mysql_query($query) or die(
2009/1/15 Leon du Plessis :
> I used that notation before, and it did not work 100%.
> Adapt as follows:
>
> for ($i = 'a'; $i <= 'z'; $i++)
>if ($i == "aa") break; else echo $i;
It's weird, but true--the simple '<=' breaks the loop.
However, in the above example, you don't need the 'else'; t
WRT Frameworks..
before I rant, I should declare myself as an ex-consultant to Zend.
I have used most of the more popular frameworks, and in my current employment
am using Zend Framework.
All of the frameworks I have used, have had some good features, and some
poorly implemented ones. This, I be
I used that notation before, and it did not work 100%.
Adapt as follows:
for ($i = 'a'; $i <= 'z'; $i++)
if ($i == "aa") break; else echo $i;
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: 16 January 2009 07:55 AM
To: php-general@lists.php.net
Subject:
Hi Daevid,
Your included db.inc.php file contains what appears to be a very strict
injunction against people on this list making use of it.
In particular, these lines:
#---
#
# Confidential - Property of Symcell Corporation
# Do not
On Thu, Jan 15, 2009 at 08:32:14PM -0800, paragasu wrote:
> i have this cute little problem. i want to print a to z for site navigation
> my first attempt work fine
>
> for($i = '65'; $i < '91'; ++$i)
> echo chr($i);
>
> but someone point me a more interesting solutions
>
> for($i = 'a'; $i <
On Fri, Jan 16, 2009 at 11:57:24AM +1100, Clancy wrote:
> For some time I have had feedback pages on several of my websites based
> on the example
> given by David Powers in chapter 6 of "PHP for Dreamweaver 8". These worked
> fine for some
> years, but some months ago someone started stuffing por
On Thu, Jan 15, 2009 at 04:17:51AM -0500, Robert Cummings wrote:
> On Wed, 2009-01-14 at 21:17 -0500, Paul M Foster wrote:
> > On Wed, Jan 14, 2009 at 01:39:02PM -0800, Daevid Vincent wrote:
> >
> > >
> > >The pages are significantly slower than straight PHP by orders of
> > >magnitude: [
Hi Edmund,
You want a regex that looks something like this:
$result = preg_replace('%(href=)("|\')(?!c:/)(.+?)("|\')%',
'\1\2c:/my_absolute_path\3\4', $subject);
This example assumes that your absolute path begins with "c:/". You would
change this to whatever suits. You would also change "c:/my_
On Thu, Jan 15, 2009 at 04:20:16AM -0500, Robert Cummings wrote:
> On Wed, 2009-01-14 at 21:17 -0500, Paul M Foster wrote:
> >
> > Incidentally, I would differ from the reviewer in the link above only in
> > this respect: He maintains that every line of code adds time. While this
> > is true, I be
> $letters = range('a', 'z');
> foreach ($letters as $letter) {
> echo $letter;
> }
wow.. that is a very nice solutions you give me chris.
thanks
On 1/15/09, Chris wrote:
> paragasu wrote:
>> i have this cute little problem. i want to print a to z for site
>> navigation
>> my first attempt work
paragasu wrote:
i have this cute little problem. i want to print a to z for site navigation
my first attempt work fine
for($i = '65'; $i < '91'; ++$i)
echo chr($i);
but someone point me a more interesting solutions
$letters = range('a', 'z');
foreach ($letters as $letter) {
echo $letter;
i have this cute little problem. i want to print a to z for site navigation
my first attempt work fine
for($i = '65'; $i < '91'; ++$i)
echo chr($i);
but someone point me a more interesting solutions
for($i = 'a'; $i < 'z'; ++$i)
echo $i
the only problem with the 2nd solutions is it only pri
On Thu, Jan 15, 2009 at 4:57 PM, Clancy wrote:
> For some time I have had feedback pages on several of my websites based on
> the example
> given by David Powers in chapter 6 of "PHP for Dreamweaver 8". These worked
> fine for some
> years, but some months ago someone started stuffing pornographi
For some time I have had feedback pages on several of my websites based on the
example
given by David Powers in chapter 6 of "PHP for Dreamweaver 8". These worked
fine for some
years, but some months ago someone started stuffing pornographic advertisements
into them.
A few weeks ago I got fed u
2009/1/15 tedd
> At 9:46 AM -0800 1/15/09, Chris Carter wrote:
>
> Chris:
>
> That's not the way I would do it. After establishing a connection with the
> database, I would use the query:
>
> $query "SELECT email FROM owners WHERE email = '$emailAddress' ":
> $result = mysql_query($query) or die(
At 9:46 AM -0800 1/15/09, Chris Carter wrote:
Chris:
That's not the way I would do it. After establishing a connection
with the database, I would use the query:
$query "SELECT email FROM owners WHERE email = '$emailAddress' ":
$result = mysql_query($query) or die(mysql_error());
if(mysql_aff
On Thu, Jan 15, 2009 at 16:35, Eduardo Varela wrote:
>
> Does anyone know
> address
> subject
> text
> for getting a digest instead of the individual mails?
You will have to first unsubscribe from the list, then subscribe
to digest format at http://php.net/mailinglists
If you
Hey,
I want to "parse" a href-attribute in a given String to check if there is a
relative link and then adding an absolute path.
Example:
$string = '';
I tried using regular expressions but my knowledge of RegEx is very limited.
Things to consider:
- $string could be quite long but my concern are
Eduardo Varela wrote:
Hi, folks. I own an old Pentium I machine, and I pay phone connection
with Internet by the minute, so I want to recieve a digest from the
list.
In the first communication from this list I was said:
"For help and a description of available commands, send a message to:
"
Frank Stanovcak wrote:
> "VamVan" wrote in message
> news:12eb8b030901141421u6741b943q396bc784136b7...@mail.gmail.com...
>
>> On Wed, Jan 14, 2009 at 2:22 PM, Frank Stanovcak
>> wrote:
>>
>>
>>> This is mostly to make sure I understand how sessions are handled
>>> correctly.
>>> As far as
On Thu, Jan 15, 2009 at 1:35 PM, Eduardo Varela wrote:
> Hi, folks. I own an old Pentium I machine, and I pay phone connection
> with Internet by the minute, so I want to recieve a digest from the
> list.
>
> In the first communication from this list I was said:
>
> "For help and a description of
Hi, folks. I own an old Pentium I machine, and I pay phone connection
with Internet by the minute, so I want to recieve a digest from the
list.
In the first communication from this list I was said:
"For help and a description of available commands, send a message to:
"
Does anyone know
ad
Thanks man that did it :-) .
What exactly was the problem you've noticed (I am seeing a diff between the
two files bu t I am not sure I fully understand)?
--
Thodoris
Yes I have previously worked on loads of Greek sites. Some how strange
enough I had problems whenever I used UTF-8 to store cont
Shawn McKenzie wrote:
> paragasu wrote:
>> is it possible to do it like
> SELECT *, UNIX_TIMESTAMP(post_date)-172,800 as is_new FROM tbl
> $post = mysqli_fetch_object($sql);
> if($post->is_new)
> echo '';
>
> From what I can tell, you'll just have a timestamp 2 days earlier than
> the actual post
Umm I don't think there is any benchmark tests that will suit your case, it
really depends on what you are going to do to the image. I suggest you to
benchmark and measure these things, I also know codeigniter has a built-in
image editing class, and as far as I remember you can choose in your confi
I think I'm going to stick with objects generated by POG, PEAR classes
where they can save me time and Smarty templates for display.
Glad we had this little fireside chat before I started on my next project
with an ambition to use some fancy new framework.
You guys saved me what sounds like
paragasu wrote:
> is it possible to do it like
SELECT *, UNIX_TIMESTAMP(post_date)-172,800 as is_new FROM tbl
>
$post = mysqli_fetch_object($sql);
if($post->is_new)
echo '';
>From what I can tell, you'll just have a timestamp 2 days earlier than
the actual post date in the is_new var. So unless
You might want to (seriously) look at the PEAR Auth class.
It can save you a TON of time...all the stuff you're trying to do with
this code (that you were just told you're going to have to rewrite) is
already done for you.
It's very handy for registering/tracking users of your sites.
John Corry
On Thu, 2009-01-15 at 13:52 -0500, Sam Stelfox wrote:
> Daevid Vincent wrote:
>
> >
> > The pages are significantly slower than straight PHP by orders of
> > magnitude: http://paul-m-jones.com/?p=315
> >
>
> http://www.codinghorror.com/blog/archives/001198.html
>
> I know this blog isn't spe
I have a site (done in CodeIgniter) where users can upload pictures. When
they upload a picture, I want to rotate it (rotating is optional, depending
on how much cpu/ram I end up needing), resize it, and create a thumbnail.
Right now I'm doing it all in that order using GD, but I'm not sure if i
bruce wrote:
> Hi List!
>
>
> I know this is somewhat basic.. and I am searching google as I type! I'm
> looking for a client/server app that allows me to have a quick/dirty client
> that can upload/download a file to a server app, with the server app copying
> the file to a given dir...
>
> Cod
Welcome to the list, Chris.
Your code is going to require some rewriting to save you a lot of
headaches and serious security issues down the road. So here we go:
On Thu, Jan 15, 2009 at 12:46, Chris Carter wrote:
*/
if($_POST['submit']) {
// Check to see if the user already exist
Applejus wrote:
> Hello there,
>
> Kind of newbie to PHP and javascript... I have this problem:
>
> I want to pass a javascript variable to a PHP code.
> I am inside a javascript function that is creating HTML elements
> dynamically. After creating a tag, I want to populate it with a
> list of v
"VamVan" wrote in message
news:12eb8b030901141421u6741b943q396bc784136b7...@mail.gmail.com...
> On Wed, Jan 14, 2009 at 2:22 PM, Frank Stanovcak
> wrote:
>
>> This is mostly to make sure I understand how sessions are handled
>> correctly.
>> As far as sessions are concerned the variable data is
Daevid Vincent wrote:
>
> The pages are significantly slower than straight PHP by orders of
> magnitude: http://paul-m-jones.com/?p=315
>
http://www.codinghorror.com/blog/archives/001198.html
I know this blog isn't specifically about PHP but he makes a good
general point that can be applied to thi
It is over head, but it caches the execution plan for multiple runs
of the
script. So different users with different data will use the same cached
query on the database. Saving processing time. It also prevents SQL
injection on the fly because you are indicating what data type each
place
Hello there,
Kind of newbie to PHP and javascript... I have this problem:
I want to pass a javascript variable to a PHP code.
I am inside a javascript function that is creating HTML elements
dynamically. After creating a tag, I want to populate it with a
list of variable names from $_SESSION['s
Hi List!
I know this is somewhat basic.. and I am searching google as I type! I'm
looking for a client/server app that allows me to have a quick/dirty client
that can upload/download a file to a server app, with the server app copying
the file to a given dir...
Code samples, or pointers to a sit
At 12:46 PM -0500 1/15/09, Jason Pruim wrote:
Hey tedd,
One thing I just thought of that I'm sure you checked but just in
case... With the current system do they have any way of adding new
users to it? If so... there would be info in a file that had
the algorithm info you need...
Other then
Hi there, I'm not sure if this is the same problem but after I struggled
with strange characters in Spreadsheet Excel Writer for some time I wrote an
article from my lessons learned:
http://research.elabs.govt.nz/generating-excel-spreadsheets-with-maori-macrons-in-php/
It contains some example
At 9:11 AM -0600 1/15/09, Boyd, Todd M. wrote:
tedd,
It would appear your Standard DES and MD5 labels are actually both MD5.
Also--there is more than just Standard DES. Once DES was determined to
be relatively IN-secure, more algorithms like Triple DES, G-DES, DES-X,
LOKI89, and ICE were create
On Thu, 2009-01-15 at 19:37 +0200, Sancar Saran wrote:
> On Thursday 15 January 2009 17:45:35 Robert Cummings wrote:
>
> > >
> > > Hell, yes, signed to from start to end.
> > >
> > > After RoR, PHP guys (including Zend) goes nuts.
> > > Every one eat his brains to develop RoR like Framework.
>
On Thu, Jan 15, 2009 at 06:30, Sándor Tamás (HostWare Kft. )
wrote:
> Hi,
>
> My problem is that how I can know that a valid e-mail address is exists on
> the mail server?
> Is there some PHP function, or protocol, or something?
The quick and simple answer is no. Imagine if it was that easy
At 7:56 PM -0500 1/14/09, Andrew Ballard wrote:
I didn't get that from your original post at all. You asked how to
"create an encoded password string that would work in a .htaccess file
using basic authentication."
Yes, but that was before I knew that generating a password from the
command lin
Hi,
I know this is very basic question, this is so because I am a basic
programmer struggling to make things work.
Where in this code should I be trying to check if the user already exists
and throw an error saying "The user already exists ding ding ding". The
check has to be done with the email
At 12:42 AM +0100 1/15/09, Edmund Hertle wrote:
I think I do not really understand your problem... searching for
standard crypt algorithms? google, wikipedia and such should help.
I solved the problem myself, which basically meant there was no way
to determine what the algorithm was except for
On Jan 15, 2009, at 12:32 PM, tedd wrote:
At 11:43 PM + 1/14/09, Ashley Sheridan wrote:
>
Surely that's a good thing then? Security through obscurity and all
that...
Ash
Ash:
Certainly it's a good thing -- until the client asks for another
password.
At this point, I have four log
On Thursday 15 January 2009 17:45:35 Robert Cummings wrote:
> >
> > Hell, yes, signed to from start to end.
> >
> > After RoR, PHP guys (including Zend) goes nuts.
> > Every one eat his brains to develop RoR like Framework.
>
> What are you smoking? I like my framework the way it is. I'm sure
At 11:43 PM + 1/14/09, Ashley Sheridan wrote:
>
Surely that's a good thing then? Security through obscurity and all
that...
Ash
Ash:
Certainly it's a good thing -- until the client asks for another password.
At this point, I have four logon and password combinations to use. I
can tell
On Thu, 2009-01-15 at 17:34 +0200, Sancar Saran wrote:
> On Wednesday 14 January 2009 23:39:02 Daevid Vincent wrote:
> > Not to start a Holy War (as these "to framework" or "not to framework"
> > debates often turn into), but I personally had a horrible experience
> > with using frameworks. I was f
Nathan Rixham wrote:
it's the pack offset that's wrong; remove all together and you'll get
the correct results:
$d = unpack('nth/Ntl/nfudge/nmac_size', $data);
Thanks, thought I had already tried that but obviously not.
Cheers
James
--
PHP General Mailing List (http://www.php.net/)
To unsub
On Wednesday 14 January 2009 23:39:02 Daevid Vincent wrote:
> Not to start a Holy War (as these "to framework" or "not to framework"
> debates often turn into), but I personally had a horrible experience
> with using frameworks. I was forced to use Symfony at my last job and it
> was so cumbersome
On Jan 15, 2009, at 10:19 AM, "Boyd, Todd M." wrote:
-Original Message-
From: Paul M Foster [mailto:pa...@quillandmouse.com]
Sent: Wednesday, January 14, 2009 8:18 PM
To: php-general@lists.php.net
Subject: Re: [PHP] Zend Framework...where to start? -- don't.
---8<---
I agree and d
> -Original Message-
> From: Paul M Foster [mailto:pa...@quillandmouse.com]
> Sent: Wednesday, January 14, 2009 8:18 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Zend Framework...where to start? -- don't.
>
---8<---
> I agree and disagree. I agree there's waaay too much herd m
2 things. In that query, you can't have a comma in your 172,800. It's
going to fail b/c 800 isn't a column name. Unless it actually is, then
you're good to go. =D Secondly, to be more user friendly, if the user
has viewed that news item, then mark it as read (take away the
new.gif). There a
> -Original Message-
> From: tedd [mailto:tedd.sperl...@gmail.com]
> Sent: Wednesday, January 14, 2009 5:18 PM
> To: Shawn McKenzie; php-general@lists.php.net
> Subject: Re: [PHP] Basic Authentication
>
> At 2:19 PM -0600 1/14/09, Shawn McKenzie wrote:
> >
> >
> >As others have said, use c
On Thu, Jan 15, 2009 at 09:57:42AM +0300, Usamah M. Ali wrote:
> On Thu, Jan 15, 2009 at 1:59 AM, Paul M Foster
> wrote:
>
> > If you're going to go with a prebuilt framework, I'd recommend
> > CodeIgniter for your first time out. If the docs look good to you (and
> > they are pretty good), you'
On Wed, 14 Jan 2009 13:19:31 +0200, Thodoris wrote:
Variable_name Value
character_set_clientutf8
character_set_connectionutf8
character_set_database latin1
character_set_filesystembinary
character_set_results utf8
character_set_serverlatin1
character_set_system
On Thu, Jan 15, 2009 at 1:57 AM, Usamah M. Ali wrote:
> On Thu, Jan 15, 2009 at 1:59 AM, Paul M Foster
> wrote:
>
>> If you're going to go with a prebuilt framework, I'd recommend
>> CodeIgniter for your first time out. If the docs look good to you (and
>> they are pretty good), you'll probably
Hi,
I have some code developed on a linux system with PHP 5.1.6, its using
the PEAR Net_DNS class to send dns updates, part of this requires
unpacking a binary string, an example is below.
This works on PHP 5.1.6 but fails on 5.2.8, it appears that it may be in
relation to the following chan
That should work as well
Bastien
Sent from my iPod
On Jan 15, 2009, at 4:14 AM, paragasu wrote:
is it possible to do it like
SELECT *, UNIX_TIMESTAMP(post_date)-172,800 as is_new FROM tbl
$post = mysqli_fetch_object($sql);
if($post->is_new)
echo '';
On 1/14/09, Phpster wrote:
Make it eas
On Thu, Jan 15, 2009 at 9:48 AM, Robert Cummings wrote:
> On Thu, 2009-01-15 at 09:03 -0200, Edgar da Silva (Fly2k) wrote:
>> The question is interesting.
>>
>> I do another question: Will PHP5 support PHP4 backward compatibility
>> forever? Ok I'm rediculous, forever not, but, until 5.3 or 6?
>
>
On Thu, 2009-01-15 at 09:03 -0200, Edgar da Silva (Fly2k) wrote:
> The question is interesting.
>
> I do another question: Will PHP5 support PHP4 backward compatibility
> forever? Ok I'm rediculous, forever not, but, until 5.3 or 6?
I think once PHP6 comes out we'll find that some PHP4 idiosyncra
> My problem is that how I can know that a valid e-mail address is exists on
> the mail server?
> Is there some PHP function, or protocol, or something?
The only way is to send email to it with an ID that the user has to
give back to you (Eg. have them go to a particular URL). That way you
can be
U can find sometinhg on http://www.phpclasses.org/,
http://www.phpclasses.org/browse/package/1519.html, there's a lot of
sugestions there
zechim
-Mensagem original-
De: Sándor Tamás (HostWare Kft.) [mailto:sandorta...@hostware.hu]
Enviada em: quinta-feira, 15 de janeiro de 2009 09:30
Par
Hi,
My problem is that how I can know that a valid e-mail address is exists on the
mail server?
Is there some PHP function, or protocol, or something?
Thanks,
SanTa
The question is interesting.
I do another question: Will PHP5 support PHP4 backward compatibility
forever? Ok I'm rediculous, forever not, but, until 5.3 or 6?
I really don't know how CI thinks about evolution, but I'm very
curious why don't use the new features that provide good evolution?
"It'
Colin Guthrie schrieb:
'Twas brillig, and Daevid Vincent at 14/01/09 21:39 did gyre and gimble:
The pages are significantly slower than straight PHP by orders of
magnitude: http://paul-m-jones.com/?p=315
Shock News: Frameworks that allow you to write an application in less
code do stuff in th
'Twas brillig, and Daevid Vincent at 14/01/09 21:39 did gyre and gimble:
The pages are significantly slower than straight PHP by orders of
magnitude: http://paul-m-jones.com/?p=315
Shock News: Frameworks that allow you to write an application in less
code do stuff in the background for you.
On Thu, 2009-01-15 at 09:57 +0300, Usamah M. Ali wrote:
> On Thu, Jan 15, 2009 at 1:59 AM, Paul M Foster
> wrote:
>
> > If you're going to go with a prebuilt framework, I'd recommend
> > CodeIgniter for your first time out. If the docs look good to you (and
> > they are pretty good), you'll prob
On Wed, 2009-01-14 at 21:17 -0500, Paul M Foster wrote:
>
> Incidentally, I would differ from the reviewer in the link above only in
> this respect: He maintains that every line of code adds time. While this
> is true, I believe it's the number of files which have to be opened
> which drags down fr
On Wed, 2009-01-14 at 21:17 -0500, Paul M Foster wrote:
> On Wed, Jan 14, 2009 at 01:39:02PM -0800, Daevid Vincent wrote:
>
> >Not to start a Holy War (as these "to framework" or "not to framework"
> >debates often turn into), but I personally had a horrible experience with
> >using fr
is it possible to do it like
SELECT *, UNIX_TIMESTAMP(post_date)-172,800 as is_new FROM tbl
$post = mysqli_fetch_object($sql);
if($post->is_new)
echo '';
On 1/14/09, Phpster wrote:
> Make it easy and store the date as a unix timestamp. Then it's a
> simple testto do
>
> If ((current timestam
Well, Symcell Corporation is *my* company, so I give you all right to use it :)
I just dragged and dropped that file as an example.
I'm a firm believer in FOSS and sharring code.
That notice is basically some copy paste C.Y.A. and part of a standard header
all my files have.
If you prefer, the
On Wed, 2009-01-14 at 15:47 -0800, Daevid Vincent wrote:
> On Wed, 2009-01-14 at 14:28 -0800, Kyle Terry wrote:
>
> > On Wed, Jan 14, 2009 at 2:18 PM, Eric Butera wrote:
> >
> > > On Wed, Jan 14, 2009 at 5:03 PM, Robert Cummings
> > > wrote:
> > > > On Wed, 2009-01-14 at 17:01 -0500, Robert Cum
On Wed, 2009-01-14 at 14:28 -0800, Kyle Terry wrote:
> On Wed, Jan 14, 2009 at 2:18 PM, Eric Butera wrote:
>
> > On Wed, Jan 14, 2009 at 5:03 PM, Robert Cummings
> > wrote:
> > > On Wed, 2009-01-14 at 17:01 -0500, Robert Cummings wrote:
> > >> On Wed, 2009-01-14 at 16:50 -0500, Eric Butera wrote
I think Daevid has some valid points although I think frameworks still have
a lot of value, I've recently learned to use the CakePHP framework and have
been happy with the development time improvements. But more then that I've
found it has made my applications more extensible and flexible.
As to t
Hi there, I'm not sure if this is the same problem but after I struggled
with strange characters in Spreadsheet Excel Writer for some time I wrote an
article from my lessons learned:
http://research.elabs.govt.nz/generating-excel-spreadsheets-with-maori-macrons-in-php/
It contains some example co
80 matches
Mail list logo