RE: [PHP] PHP on one box, Apache on another?

2003-07-01 Thread Dan Joseph
Hi,

> Your intention is a little foggy.
> PHP is server side, it works through the web server, thus Apache
> parses the
> scripts, so no, it can't.
>
> If you mean scripts on one box, database on another, no problem.
>
> Miles Thompson
>
> At 09:20 AM 7/1/2003 -0500, Jay Blanchard wrote:
> >I don't know the details of this request (like why., but as soon as I
> >know I'll tell you) but can Apache live on one box with all PHP requests
> >being handled on another box?

Well, technically, you could do it.  You could network the two together,
and then map a network path to the files on the other server.  I don't know
what advantages this would really give someone, though...

-Dan JOseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP on one box, Apache on another?

2003-07-01 Thread Dan Joseph
Hi,

> I told him that support for PHP was compiled into Apache and that it
> would be impractical. I asked if he wanted the DB on another box. I
> asked if he wated the scripts on another box. I am quite sure that there
> is no particular logic behind the request as I have not received any
> answers. If he tells me more I'll let you know.

We had a request for this type of setup a couple months ago.  The only
logic behind it was a guy who didn't have any idea what he was talking about
reading somewhere that you should have 3 servers per application you setup.
1. Web Server, 2. File Server, 3. DB Server.  After we all got done laughing
him off the phone call, we setup 2 servers, 1. Web/Files, 2. DB.
Fortunately he decided to listen that day.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: PHP user group

2003-07-02 Thread Dan Joseph
Searching google.com for 'php user groups' turns up dozens of links.

-Dan Joseph

> -Original Message-
> From: Ray Hunter [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 02, 2003 2:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: PHP user group
> 
> 
> there use to be phpusergroups.org but not sure if that is still going
> on...
> 
> i know of 2 for utah and colorado...
> 
> 1. Colorado   = http://coloradophp.org
> 2. Utah   = http://phpslc.com
> 
> Perhaps others will add to the list.
> 
> --
> BigDog
> 
> On Wed, 2003-07-02 at 12:06, erythros wrote:
> > there are php user groups
> > 
> > hmmm... there should a listing for that.
> > someone should start a list...
> > 
> > i wish there was one near me...
> > 
> > "Erich Kolb" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Does anyone know of a PHP user group near Gurnee, IL.  I found one in
> > > Chicago, but its a little far to go and they meet in the 
> middle of the day
> > > on Sat.
> > >
> > >
> > 
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Get Rid of this Crook

2003-07-03 Thread Dan Joseph
No, they actually contact you, and scam you for about 2 trips to Europe, and
$50,000.  That's how they make their money.  There have been several
documentaries on cable about this stuff.

-Dan Joseph

> -Original Message-
> From: Brian S. Drexler [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 7:55 AM
> To: 'Daryl Meese'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Get Rid of this Crook
>
>
> You do have to admit though, it is a pretty good story. :-)  Now
> let me ask
> you this.  You reply to this e-mail and give your phone/fax
> numbers and then
> I'm assuming those get spammed all to hell too.  Correct?
>
> -Original Message-
> From: Daryl Meese [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 7:33 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Get Rid of this Crook
>
>
> Could someone that this ass of the mailing list
>
> Daryl
>
>
>
> -Original Message-
> From: MARIAM ABACHA [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 12:02 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] ASSISTANCE NEEDED
>
>
> Hello,
> I am sorry for the embarrassment this letter might cause you as
> we have not
> had any correspondence before this letter. I got your address through my
> nephew   with Nigerian Military Chamber of Commerce industry and Mining
> during my research for a reliable and trustworthy partner who l can do
> business with though l did not disclose the nature of the
> business l intend
> to do with whoever he recommend for me.
> I am DR. MRS MARIAM ABACHA, wife of the late Nigeria Head of
> State, General
> Sanni Abacha who died on the 8th of June 1998 while still on
> active duty. I
> am contacting you in view of the fact that we will be of great
> assistance to
> each other likeness developing a cordial relationship.
> I currently have within my reach the sum of Twenty - Five Million
> US Dollars
> (US$25,000,000.00) cash which l intends to use for investment, like Real
> Estate Development specifically in your country. This money came as a
> payback contract deal between my late husband and a Russian Firm on our
> countries Multi-billion dollars Ajaokuta Steel Plant.
> The Russian Partners returned my husband's Share of
> USD$25,000,000.00 after
> the death of my husband and Lodged in my husband's Security
> Company of which
> l am director right now, the new Civilian Government have
> intensified their
> probe on my husband? Financial and oil company. In view of these, l acted
> fast to withdraw the US$25,000,000.00 from the company vault and deposited
> it in a Security Company. I have since declared the Security Company
> bankrupt. No record ever existed concerning the money traceable by the
> government because there is no documentation showing that we received the
> money from the Russian.
> Due to the current situation in the country concerning government attitude
> towards my family, it has become quite impossible for me to make
> use of this
> money within. Let me refer you to the front page of this day newspapers of
> 10th March 2001. You can check it through their website
> www.thisdayonline.com the present government in Nigeria had frozen and
> seized all our bank accounts both here in Nigeria and abroad.Thus
> consent l
> shall expect you to contact me urgently to enable us discuss in
> detail about
> this transaction.Bearing in mind that your assistance is needed
> to transfer
> this fund, I proposed a percentage of 30% of the total sum to you for the
> expected service and assistance, 5% for offsetting minor expenses incurred
> in the  course of this transaction. Your urgent response is
> highly needed as
> to stop further contacts. All correspondence must be by the email address
> [EMAIL PROTECTED]  I will give you my Tel numbers where you can
> contact me when I hear from you.
> I must use this opportunity to implore you to exercise the utmost
> indulgence
> to keep this matter extraordinarily confidential whatever your decision
> while await your prompt response.
> NB: Because of the security being mounted on the members of my
> family, l has
> decided that this transaction exist between you and my nephew Dr. Azeez
> Bello. Remember to include your private Tel/fax or mobile number for easy
> communication.
> Best Regards.
> DR. (MRS) MARIAM ABACHA
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] print html code

2003-07-03 Thread Dan Joseph
Hi,

> I would bet that it would be easier to come up with a browser that
> supports 100% of the HTML standard (which is IMHO the minimum the
> browser HAS to support) than it would be to come up with a browser that
> supports 100% of the nonstandard.  :)
>
> As the old saying goes two wrongs don't make a right.

There's no such thing.  Its SQL servers, some support the full language,
some don't.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Redirect to a different frame...

2003-07-03 Thread Dan Joseph
Hi,

> I was wondering if there is a way to use the header function in php to
> redirect the browser's output to a different frame.
>
> Specifically, I have a form on frame A which has two submit buttons.  I
> would like one to submit the data in the form to a page which will load
> in frame A, and the other to submit the data to the same page which will
> load in frame B.

in your  tag, you can put target=framename, example:



Anything submitted from that frame will target the specified frame.  No
fancy PHP needed, unless you want to make the target dynamic.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Redirect to a different frame...

2003-07-03 Thread Dan Joseph
Oh, yeah, that is correct.  You'd need to use the  tag and put some
javascript in them to target the frames.  I'm not up on the javascript
enough though, check javascript.internet.com for more information.

-Dan Joseph

> -Original Message-
> From: Grant Rutherford [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 12:03 PM
> To: Dan Joseph
> Cc: PHP Mailing List
> Subject: RE: [PHP] Redirect to a different frame...
>
>
> Hi there,
>
> Thanks for your response.  I understand that I can specify a target in
> the form tag.  However, if I were to do that both buttons would have to
> go to the same frame.  (I think?)
>
> If I could specify the target for each submit button, that would work
> perfectly.  Also, if I could have the same input fields shared between
> two forms (one for each target destination).  However, I don't think
> that either of these is an option in regular HTML.
>
> Thanks,
> Grant
>
>
> On Thu, 2003-07-03 at 10:41, Dan Joseph wrote:
> > Hi,
> >
> > > I was wondering if there is a way to use the header function in php to
> > > redirect the browser's output to a different frame.
> > >
> > > Specifically, I have a form on frame A which has two submit
> buttons.  I
> > > would like one to submit the data in the form to a page which
> will load
> > > in frame A, and the other to submit the data to the same page
> which will
> > > load in frame B.
> >
> > in your  tag, you can put target=framename, example:
> >
> >  target=framethree>
> >
> > Anything submitted from that frame will target the
> specified frame.  No
> > fancy PHP needed, unless you want to make the target dynamic.
> >
> > -Dan Joseph
> --
> Grant Rutherford
> Iders Incorporated
> 600A Clifton Street
> Winnipeg, MB Canada R3G 2X6
> http://www.iders.ca
> tel: 204-779-5400 ext 36
> fax: 204-779-5444
>
> This message is intended solely for the use of the designated
> recipient(s) and their appointed delegates, and may contain
> confidential information.  Any unauthorized disclosure,
> copying or distribution of its contents is strictly prohibited.
> If you have received this message in error, please destroy it
> and advise the sender immediately by phone, email or facsimile.
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mcrypt warning

2003-07-09 Thread Dan Joseph
Hi All,

I have the following function:

function encrypt ($x) {
$ini = parse_ini_file ($GLOBALS['INI_PATH']);
$td  = mcrypt_module_open ('tripledes', '', 'ecb', '');
$iv  = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td),
MCRYPT_RIJNDAEL_256);

mcrypt_generic_init ($td, $ini["key"], $iv);

$encrypted_data = mcrypt_generic ($td, $x);

mcrypt_generic_deinit ($td);
mcrypt_module_close ($td);

return bin2hex($encrypted_data);
}

I get the following PHP Warning in my logs, however, the code executes ok:

[Wed Jul  9 10:25:49 2003] [error] PHP Warning:  mcrypt_generic_init(): Iv
size incorrect; supplied length: 0, needed: 8 in
/usr/local/apache/htdocs-uat-retail/include/nocheck.iostream.class.php on
line 87

I have read into mcrypt, tried a couple things, but nothing will get rid of
that error.  Could someone show me what I've done wrong?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] nested for loops

2003-07-09 Thread Dan Joseph
Hi,

I did one once.  It was similar to what you typed out here.  Are you having
troubles with this?

-Dan Joseph

> -Original Message-
> From: Micah Montoy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 1:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] nested for loops
>
>
> Anyone ever do a nested for loop?
>
> $i =0;
> $j =0;
> for ($x=0; $x < 50; $x++){
> echo ("1 to 50");
>
> for ($j=0: $j < 5; $j++) {
> echo ("less than 5");
> }
> }
>
> I haven't seen a nested loop in PHP, so I'm not sure of the exact syntax.
>
> thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] mcrypt warning

2003-07-10 Thread Dan Joseph
Hi,

> I use this to set iv to null so I don't need to worry about it :)
> 
> $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv);

Ahh ok, I'll give that a try and let you know how it comes out.  Thanks!

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] OnClick problem

2003-07-10 Thread Dan Joseph
Hi,

> Here's something I cant explain:
> I have a page with a form on it (checkboxes) and a hyperlink which is 
> supposed to send the form to the server using:
> 
>  Trouble is that the link always points to the name of the 
> previous page I 
> came from. All pages are php generated on-the-fly.
> Is this a php problem? Anyone has a clue?
> I really don't want to use a submit button in this case.

Are you using the variable $_SERVER['PHP_SELF'] for your link target?

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] OnClick problem

2003-07-10 Thread Dan Joseph
Hi,

> > Are you using the variable $_SERVER['PHP_SELF'] for your 
> link target?
> 
> I'm not, I'm a total newbie and don't quite understand, you mean 
> instead of 
> href="#" use href=$_SERVER['PHP_SELF']?
> Please bare with me and explain.

Yeah, it would be:



        If that doesn't work, could you paste in a few lines of code?

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP POS program

2003-07-16 Thread Dan Joseph
Hi,

> And AFAIK all POS systems, which were written under Windows had no
> succes because of the user interface. So I'm for 5 years out of this
> branche but as I can see in supermarkets, there are still good old MSDOS
> applications.

There are plenty of good windows based systems.  There are also plenty of
good web-based systems.  To say that only MS-DOS applications can do POS
properly is kind of niave.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] paypal and ecommerce

2003-07-18 Thread Dan Joseph
Hi,

It kind of looks to me that each seller will be paid directly, with no
money being processed by his web site.  Like eBay does..  However, you'll be
able to buy 2+ items at one time.

Do you want suggestions on how to set it up for one checkout process, and
several payment destinations?

-Dan Joseph

> -Original Message-
> From: Ralph Guzman [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 18, 2003 2:57 PM
> To: 'Edward Peloke'; '[EMAIL PROTECTED] Php. Net'
> Subject: RE: [PHP] paypal and ecommerce
>
>
> Maybe it's just me, but I don't quite understand what you mean by this:
>
> "The problem is, when we allow anyone to post items, you
> may go to the site, chose five items to buy but they are all from
> different
> people.  How do you handle the check out?"
>
> Can you rephrase? Are you talking about having an affiliate program?
>
> -Original Message-
> From: Edward Peloke [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 18, 2003 12:01 PM
> To: [EMAIL PROTECTED] Php. Net
> Subject: [PHP] paypal and ecommerce
>
> Looking for opinions as to the best way to handle this.
>
> I am using a php ecommerce product(osCommerce) to create an 'online
> yardsale'.  This will not be an auction site but items for sale at a
> straight price.  Currently the site is set up so the user can place
> several
> things in their basket, check out and the website owner is credited (via
> paypal accounts).  The problem is, when we allow anyone to post items,
> you
> may go to the site, chose five items to buy but they are all from
> different
> people.  How do you handle the check out?  We don't want them to have to
> check out five times so all of the five sellers can have their accounts
> credited.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Eddie
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] a good PHP free forum?

2003-07-21 Thread Dan Joseph
phpBB is pretty good.

-Dan Joseph

> -Original Message-
> From: Denis L. Menezes [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 11:57 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] a good PHP free forum?
> 
> 
> Hello friends.
> 
> Can someone suggest a very good and easy to customise forum?
> 
> Thanks
> Denis
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
Hi,

Trying to accomplish:

I want to sort my array by two columns.  The array is setup:

Array
(
[0] => Array
(
[0] => CHECKING
[ba_type] => CHECKING
[1] => 10132200
[loan_number] => 10132200
[2] => 1049
[loan_id] => 1049
[3] => MONICA
[first_name] => MONICA
[4] => MERCHANT
[last_name] => MERCHANT
[5] => 2003-07-17 16:15:32
[approved_date] => 2003-07-17 16:15:32
[6] => ACH Debit
[type] => ACH Debit
)

[1] => Array
(
[0] => CHECKING
[ba_type] => CHECKING
[1] => 10154654
[loan_number] => 10154654
[2] => 1055
[loan_id] => 1055
[3] => RICH
[first_name] => RICH
[4] => LABO
[last_name] => LABO
[5] => 2003-07-17 16:15:32
[approved_date] => 2003-07-17 16:15:32
[6] => ACH Debit
[type] => ACH Debit
)
)

What I'd like to happen is first sort by ba_type, and then sort by
loan_number, so that I end up with a nice output similar to;

CHECKING 101234
CHECKING 101544
CHECKING 101573
SAVINGS  101112
SAVINGS  101224
VISA 101110
VISA 101998

Keep everything groupped together in their respective ba_type, and put the
numbers in numeric order.  I've looked at usort, and many examples of it.  I
can see how to use it to sort one column, but how would I sort a second to
achieve this?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
Hi,

Yeah, I did get it from a mysql_fetch_array().  I have:

ORDER BY
payment_methods.ba_type ASC,
loan_info.loan_number ASC

However, what it does is first orders it by ba_type, then it goes through
and re-orders it be loan_number, not keeping the ba_type order intact.  I
would have much rather handled it all with the SQL, but it just doesn't seem
to work.  Here's the entire query:

SELECT payment_methods.ba_type, loan_info.loan_number, loan_info.id AS
loan_id, cust_info.first_name, cust_info.last_name,
transactions.approved_date, payment_types.type FROM loan_info, cust_info,
transactions, payment_methods, payment_types WHERE payment_methods.id =
transactions.payment_method AND payment_types.id = transactions.trans_type
AND cust_info.id = loan_info.cust_id AND transactions.loan_id = loan_info.id
AND transactions.trans_type = 1 AND (transactions.approved_date >=
'2003-07-09 00:00:00' AND transactions.approved_date <= '2003-07-22
23:59:59') AND (loan_info.loan_number LIKE '101%' OR loan_info.loan_number
LIKE '136%' OR loan_info.loan_number LIKE '707%') GROUP BY loan_info.id
ORDER BY loan_info.loan_number ASC

Maybe I'm doing something wrong there?

-Dan Joseph

> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 11:25 AM
> To: Dan Joseph
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Array Sorting, 2 items...
>
>
> Your array seems like a result of mysql_fetch_array(), cannot you order
> it in the sql query?
>
> Dan Joseph wrote:
> > Array
> > (
> > [0] => Array
> > (
> > [0] => CHECKING
> > [ba_type] => CHECKING
> > [1] => 10132200
> > [loan_number] => 10132200
>
> > Keep everything groupped together in their respective
> ba_type, and put the
> > numbers in numeric order.  I've looked at usort, and many
> examples of it.  I
> > can see how to use it to sort one column, but how would I sort
> a second to
> > achieve this?
> Simply if ba_types are equal, continue with checking loan_numbers:
>
> function cmp ($a, $b) {
>  if ($a['ba_type'] == $b['ba_type']) {
>if ($a['loan_number'] == $b['loan_number']) return 0;
>   return ($a['loan_number'] > $b['loan_number']) ? -1 : 1;
>  }
>  return ($a['ba_type'] > $b['ba_type']) ? -1 : 1;
> }
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
Eek...  Yes, I did past it wrong...

SELECT payment_methods.ba_type, loan_info.loan_number, loan_info.id AS
loan_id, cust_info.first_name, cust_info.last_name,
transactions.approved_date, payment_types.type FROM loan_info, cust_info,
transactions, payment_methods, payment_types WHERE payment_methods.id =
transactions.payment_method AND payment_types.id = transactions.trans_type
AND cust_info.id = loan_info.cust_id AND transactions.loan_id = loan_info.id
AND transactions.trans_type = 1 AND (transactions.approved_date >=
'2003-07-09 00:00:00' AND transactions.approved_date <= '2003-07-22
23:59:59') AND (loan_info.loan_number LIKE '101%' OR loan_info.loan_number
LIKE '136%' OR loan_info.loan_number LIKE '707%') GROUP BY loan_info.id
ORDER BY payment_methods.ba_type ASC, loan_info.loan_number ASC

That's the right query.  Anything wrong with that?  Shouldn't that give me
the sort I'm looking for without having to do a usort?

-Dan Joseph

> -Original Message-
> From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 11:39 AM
> To: 'Dan Joseph'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Array Sorting, 2 items...
>
>
> > -Original Message-
> > From: Dan Joseph [mailto:[EMAIL PROTECTED]
> > Sent: 22 July 2003 16:29
> >
> > Yeah, I did get it from a mysql_fetch_array().  I have:
> >
> > ORDER BY
> > payment_methods.ba_type ASC,
> > loan_info.loan_number ASC
> >
> > However, what it does is first orders it by ba_type, then it
> > goes through
> > and re-orders it be loan_number, not keeping the ba_type
> > order intact.  I
> > would have much rather handled it all with the SQL, but it
> > just doesn't seem
> > to work.  Here's the entire query:
> >
> > SELECT payment_methods.ba_type, loan_info.loan_number, loan_info.id AS
> > loan_id, cust_info.first_name, cust_info.last_name,
> > transactions.approved_date, payment_types.type FROM
> > loan_info, cust_info,
> > transactions, payment_methods, payment_types WHERE
> > payment_methods.id =
> > transactions.payment_method AND payment_types.id =
> > transactions.trans_type
> > AND cust_info.id = loan_info.cust_id AND transactions.loan_id
> > = loan_info.id
> > AND transactions.trans_type = 1 AND (transactions.approved_date >=
> > '2003-07-09 00:00:00' AND transactions.approved_date <= '2003-07-22
> > 23:59:59') AND (loan_info.loan_number LIKE '101%' OR
> > loan_info.loan_number
> > LIKE '136%' OR loan_info.loan_number LIKE '707%') GROUP BY
> > loan_info.id
> > ORDER BY loan_info.loan_number ASC
> >
> > Maybe I'm doing something wrong there?
>
> Well, erm, maybe I've got the wrong glasses on today, or maybe
> you've made a
> cut'n'paste boo-boo, but it sure looks to me like the ORDER BY clause on
> your entire query is not the same as the one you posted above.
>
> Cheers!
>
> Mike
>
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
Uhhh, I could have sworn I posted the right one, here it is again...

SELECT payment_methods.ba_type, loan_info.loan_number, loan_info.id AS
loan_id, cust_info.first_name, cust_info.last_name,
transactions.approved_date, payment_types.type FROM loan_info, cust_info,
transactions, payment_methods, payment_types WHERE payment_methods.id =
transactions.payment_method AND payment_types.id = transactions.trans_type
AND cust_info.id = loan_info.cust_id AND transactions.loan_id = loan_info.id
AND transactions.trans_type = 1 AND (transactions.approved_date >=
'2003-07-09 00:00:00' AND transactions.approved_date <= '2003-07-22
23:59:59') AND (loan_info.loan_number LIKE '101%' OR loan_info.loan_number
LIKE '136%' OR loan_info.loan_number LIKE '707%') GROUP BY loan_info.id
ORDER BY payment_methods.ba_type ASC, loan_info.loan_number ASC

Any ideas?

-Dan Joseph

> -Original Message-
> From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 11:39 AM
> To: 'Dan Joseph'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Array Sorting, 2 items...
>
>
> > -Original Message-
> > From: Dan Joseph [mailto:[EMAIL PROTECTED]
> > Sent: 22 July 2003 16:29
> >
> > Yeah, I did get it from a mysql_fetch_array().  I have:
> >
> > ORDER BY
> > payment_methods.ba_type ASC,
> > loan_info.loan_number ASC
> >
> > However, what it does is first orders it by ba_type, then it
> > goes through
> > and re-orders it be loan_number, not keeping the ba_type
> > order intact.  I
> > would have much rather handled it all with the SQL, but it
> > just doesn't seem
> > to work.  Here's the entire query:
> >
> > SELECT payment_methods.ba_type, loan_info.loan_number, loan_info.id AS
> > loan_id, cust_info.first_name, cust_info.last_name,
> > transactions.approved_date, payment_types.type FROM
> > loan_info, cust_info,
> > transactions, payment_methods, payment_types WHERE
> > payment_methods.id =
> > transactions.payment_method AND payment_types.id =
> > transactions.trans_type
> > AND cust_info.id = loan_info.cust_id AND transactions.loan_id
> > = loan_info.id
> > AND transactions.trans_type = 1 AND (transactions.approved_date >=
> > '2003-07-09 00:00:00' AND transactions.approved_date <= '2003-07-22
> > 23:59:59') AND (loan_info.loan_number LIKE '101%' OR
> > loan_info.loan_number
> > LIKE '136%' OR loan_info.loan_number LIKE '707%') GROUP BY
> > loan_info.id
> > ORDER BY loan_info.loan_number ASC
> >
> > Maybe I'm doing something wrong there?
>
> Well, erm, maybe I've got the wrong glasses on today, or maybe
> you've made a
> cut'n'paste boo-boo, but it sure looks to me like the ORDER BY clause on
> your entire query is not the same as the one you posted above.
>
> Cheers!
>
> Mike
>
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Sorting, 2 items...

2003-07-22 Thread Dan Joseph
Hi,

You know, this worked just fine, as did my order by.  Its my brain that is
completely wacked.  I am going about this all wrong

Thanks for all your help..  Take care.. I'll let you know how it goes.

-Dan Joseph

> -Original Message-
> From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 22, 2003 11:25 AM
> To: Dan Joseph
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Array Sorting, 2 items...
>
>
> Your array seems like a result of mysql_fetch_array(), cannot you order
> it in the sql query?
>
> Dan Joseph wrote:
> > Array
> > (
> > [0] => Array
> > (
> > [0] => CHECKING
> > [ba_type] => CHECKING
> > [1] => 10132200
> > [loan_number] => 10132200
>
> > Keep everything groupped together in their respective
> ba_type, and put the
> > numbers in numeric order.  I've looked at usort, and many
> examples of it.  I
> > can see how to use it to sort one column, but how would I sort
> a second to
> > achieve this?
> Simply if ba_types are equal, continue with checking loan_numbers:
>
> function cmp ($a, $b) {
>  if ($a['ba_type'] == $b['ba_type']) {
>if ($a['loan_number'] == $b['loan_number']) return 0;
>   return ($a['loan_number'] > $b['loan_number']) ? -1 : 1;
>  }
>  return ($a['ba_type'] > $b['ba_type']) ? -1 : 1;
> }
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Software Application Engineer WANTED (PHP/MySQL Guru)

2003-07-24 Thread Dan Joseph
Aww heck, just go AWOL? :)

-Dan Joseph

> -Original Message-
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 23, 2003 5:51 PM
> To: Richard Gabriel; [EMAIL PROTECTED]
> Subject: Re: [PHP] Software Application Engineer WANTED (PHP/MySQL Guru)
> 
> 
> > Subject: [PHP] Software Application Engineer WANTED (PHP/MySQL Guru)
> 
> I hope there are job postings like this if/when I get out of the Army! :)
> 
> ---John Holmes...
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] just looking for some opinions...

2003-07-24 Thread Dan Joseph
Hi,

Just looking for an opinion on how you would do this...

Let's say I have a number: 1281924

The rules call for removing "1280+", meaning remove 128 and all 0's that
come after it, until you run into another number.

In the end, it would leave 1924, and everything else on the beginning would
be gone.

How would you setup your logic for this?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] just looking for some opinions...

2003-07-24 Thread Dan Joseph
Thanks John,

You and 4 others (3 private direct replies) all gave me the same
suggestion.  I have no idea why I never think to use a regex...  Appreciate
the thought!

-Dan Joseph

> -Original Message-
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 24, 2003 1:44 PM
> To: Dan Joseph; [EMAIL PROTECTED]
> Subject: Re: [PHP] just looking for some opinions...
>
>
> > Let's say I have a number: 1281924
> >
> > The rules call for removing "1280+", meaning remove 128 and all 0's that
> > come after it, until you run into another number.
> >
> > In the end, it would leave 1924, and everything else on the beginning
> would
> > be gone.
>
> $new_number = preg_replace('/^1280+/','',$number);
>
> ---John Holmes...
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] just looking for some opinions...

2003-07-24 Thread Dan Joseph
Hi,

> > Let's say I have a number: 1281924
> >
> > The rules call for removing "1280+", meaning remove 128 and all 0's that
> > come after it, until you run into another number.
> >
> > In the end, it would leave 1924, and everything else on the beginning
> would
> > be gone.
>
> $new_number = preg_replace('/^1280+/','',$number);

Now, since I'm only about 25% up to par with RegEx, can anyone point me to
a good site that explains them?  I've got a couple more things to do on the
number processing, but I don't want to sit here all day and keep posting
them as I come along, so I'm want to RTM...

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] just looking for some opinions...

2003-07-24 Thread Dan Joseph
Hi,

> make me wonder why people are on the list if they all post answers
> only back to the user.

Probably just a case of hitting reply and not paying attention to it, or
not realizing that it replies to the direct user.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] looking for scheduling program

2003-07-30 Thread Dan Joseph
Hi Chris,

its always more fun to write your own, however, check php project our
(might be spelled projekt, I can't remember).  Should be on freshmeat or
sourceforge.  It might do what you want.

-Dan Joseph

> -Original Message-
> From: Chris W. Parker [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 30, 2003 1:32 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] looking for scheduling program
>
>
> Hello,
>
> I'm looking for a fairly simple program. What I want is a program that
> will send an email to a predetermined address at a predetermined time.
>
> For example, I forget my family and friends birthdates very easily. I'd
> like to enter a "task" or a "note" for each person and tell the program
> to remind me of their birthday every day for two weeks before their
> actual birthdate. I also want to enter two email addresses so that the
> program will email at work and at home.
>
> Is there something out there already that does this or should I write it
> myself?
>
>
>
> Thanks,
> Chris.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Opinions on Micro$oft .NET

2003-07-31 Thread Dan Joseph
Hi Jay,

www.asp.net is a good site for learning about the ASP side of .NET, its the
web application side.  Basically Visual Basic for the web.  .NET is also
C++, C#, J#, and VB .NET.  I personally like developing in Visual Studio
.NET, but I donno about for web applications.  I use to do ASP for a living,
now I do PHP.  In some ways, I liked ASP better, but in a lot of ways, I
like PHP better.  Perl was my favorite.  I used that at my last position.
Anyhow, that'll get you started.  For any mailing lists, go to
msdn.microsoft.com, and sign up for their free newsgroups.  They have a
public news server if you don't.

-Dan Joseph

> -Original Message-
> From: Jay Paulson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 1:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Opinions on Micro$oft .NET
>
>
> I know this is a little off topic but I really need some help with this.
>
> The company I work for just got bought out by a larger company.
> The larger company uses .NET from Micro$oft. I of course use all
> open source stuff for our web sites and now the new company wants
> to come in and pretty much blow away everything I have done and
> use their .NET setup.
>
> I've basically got a month to do research and get my guns loaded
> for what I'm sure will be a heated debate about the Open Source
> Solution vs the Micro$oft .NET solution.  So what I am looking
> for is personal and professional opinions about both solutions
> (specifically PHP etc), any and all links to good articles about
> both solutions giving the pros and cons of both technologies.
> Any other mailing lists I can get on to get more opinions about
> the two technologies.  Are their any links to show the cost
> benifits of using Open Source vs Micro$oft .NET? (I know Open
> Source is free but I have no clue where to find how much .NET is).
>
> As you can see any and everything would be a great help!!!
>
> Thanks a ton!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Opinions on Micro$oft .NET

2003-07-31 Thread Dan Joseph
Hi,

If you're just doing web applications, there is a FREE dev environment
right on www.asp.net you can download.  Visual Studio gives you added
languages like C#, J# and C++.  If you're just doing web apps, the free one
is fine.

Also, I disagree about hardware costs.  Windows Server runs fine on the
same types of hardware that Linux does.

-Dan Joseph

> -Original Message-
> From: Chris W. Parker [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 1:50 PM
> To: Jay Paulson; [EMAIL PROTECTED]
> Subject: RE: [PHP] Opinions on Micro$oft .NET
>
>
> Jay Paulson <mailto:[EMAIL PROTECTED]>
> on Thursday, July 31, 2003 10:36 AM said:
>
> > Are
> > their any links to show the cost benifits of using Open Source vs
> > Micro$oft .NET? (I know Open Source is free but I have no clue where
> > to find how much .NET is).
>
> .NET is free as well. It's just a framework that is downloaded from
> microsoft's site onto your computer. From then on you can write .NET
> applications.
>
> The part that is going to cost you money if you go with the .NET
> solution is the OS, and the dev tools. Sure you can write .NET with
> notepad or pico but afaik you can't fully take advantage of it's
> features unless you have something like Visual Studio from MS, which
> costs big bucks (me thinks).
>
> With PHP, yeah you can run it on IIS but you've still got the cost of
> the OS to go with it. If you go all open source there is virtually no
> cost except that of the hardware (which applies in both cases).
>
> Hardware on the other hand can cost less for linux because of the
> efficiency of Apache/PHP and the fact that you don't have to tie up
> system resources with a GUI if you don't want to. Windows on the other
> hand needs lots of power behind it.
>
> As far as I understand it .NET is a really powerful system to use
> because you can easily integrate compiled programs. I'm pretty sure you
> can do this with PHP as well but there are probably a lot more Windows
> programmers out there than there are Linux and therefore it'd be easier
> to develop with. (Not totally sure about that though.)
>
> Bottomline, .NET is supposed to be really powerful and really great. I
> don't think you'll find that PHP can do anything .NET can't do. If
> anything, I'd err on the side of .NET being able to do something PHP can
> not.
>
> Your biggest selling point is probably a cost benefit analysis.
>
> > As you can see any and everything would be a great help!!!
>
> I hope what I've said counts.
>
>
> Chris.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Opinions on Micro$oft .NET

2003-07-31 Thread Dan Joseph
Hi,

Yeah, the framework does.  The free editor is for web apps, the Visual
Studio is for normal apps.

-Dan Joseph

> -Original Message-
> From: Chris W. Parker [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 2:04 PM
> To: Dan Joseph; Jay Paulson; [EMAIL PROTECTED]
> Subject: RE: [PHP] Opinions on Micro$oft .NET
>
>
> Dan Joseph <mailto:[EMAIL PROTECTED]>
> on Thursday, July 31, 2003 10:55 AM said:
>
> > Visual Studio
> > gives you added languages like C#, J# and C++.
>
> I thought the basic framework had both VB.NET and C# included?
>
>
>
> Chris.
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] include help please

2003-07-31 Thread Dan Joseph
Hi,

Take the quotes off around the $page variable.

-Dan Joseph

> -Original Message-
> From: LoonySalmon [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2003 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] include help please
> 
> 
> i am looking to use includes on my page,
> this is the code that i want to use to call my files with:
> 
> INDEX.PHP
> 
>  require 'files.inc.php';
> $page = '$home';
> include '$page';
> ?>
> 
> FILES.INC.PHP
> 
>  $home = 'home.html';
> $forum = 'forum/index.php';
> $contact = 'contact.html';
> ?>
> 
> I try to load up index.php and this is what i get
> 
> Warning: main($page) [function.main]: failed to create stream: No 
> such file
> or directory in C:\swamp\www\site\index.php on line 109
> 
> Warning: main() [function.main]: Failed opening '$page' for inclusion
> (include_path='.;c:\swamp\php\includes;C:\swamp\www') in
> C:\swamp\www\site\index.php on line 109
> 
> 
> 
> 
> the problem must be when i am trying to include the $page variable
> 
> could somebody please help me?
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] trying to match the front and end...

2003-08-09 Thread Dan Joseph
Hi,

> Question:
> Where is this number coming from? Couldn't you just use a substr() based
> upon it's length and not deal with a regular expression?

Its a bank account number coming from a database.  We're reformatting it
for ACH processing.  The number could be:

23408234980423

with a rule of remove 12453 from beginning, and remove 0423 from the end,
that would leave us with 2340823498.  The rule could also read to remove 234
from the beginning, and 43985 from the end, leaving us 08234980423.

The length of the number is also dynamic.

I guess I just found it easier to go over it with a couple regular
expressions, then got to thinking maybe I could combine it into one.  What
suggestion would you have?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] trying to match the front and end...

2003-08-10 Thread Dan Joseph
Hi Everyone,

I've searched the high heavens for a method of doing this...  Here's what
I'm doing... First, the code..

$middlenum = preg_replace("/^".$this->start_num."/", "",
$this->ach_acct_num);
$middlenum = preg_replace("/".$this->end_num."$/", "", $middlenum);

In a nutshell, what I want to do is chop off the front and the back.
Example:

I have: 1234567890
I want: 456

I have a start num and an end num.  start = 123, end = 7890.

This is working fine as I have it above, however I'd like to combine it into
one regular express, instead of two.  Can someone give me an example of
matching the beginning and end at the same time?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Class Design Question...

2003-08-14 Thread Dan Joseph
Hi,

> Otherwise, a year down the line, you find yourself stuck with a thing
> that needs a small modification which will take you hours and hours and
> hours and probably turn your little project into spaghetti (speaking
> from experience).

That's probably some good advice, and something for me to think about.  I
have a habbit of learning something new, and then overusing it to death...
I'm sure I'm guitly of making spaghetti.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Class Design Question...

2003-08-14 Thread Dan Joseph
Hi,

> >>Are there any performance differences that are noticable in a
> >>300-400 line PHP script if you overuse classes rather than straight
> >>functions?
>
> This is a loaded question.  If you overuse classes, there will be a
> performance hit :).  However, in a 300-400 line script, you might find
> the performance improve if using OO allows you to elegantly solve the
> problem.  There is no definitive answer.  It's like asking if you'll get
> fat from eating 1500 calories every day for a week.  A bit more
> information is needed :)

lol..  I guess it could be taken as one.  Re-reading it, I can see it
definitely appearing as one.  I just have a feeling that I overuse objects.
Sometimes I don't even take advantage of what they can do, and use 'em as
glorified functions.  I can atleast say it keeps me organized, but then
again, if its sloppy in the performance area, I'll probably change my ways.
So, I guess we're all right, depending on the situation, it could or hinder
performance.  As for more information right now, don't really have anything
specific I could toss out there.  I think I'll stop before I confuse
everyone further.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Class Design Question...

2003-08-14 Thread Dan Joseph
Hi,

Are there any performance differences that are noticable in a 300-400 line
PHP script if you overuse classes rather than straight functions?

-Dan Joseph

> -Original Message-
> From: Chris W. Parker [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 1:02 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] Class Design Question...
>
>
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> on Wednesday, August 06, 2003 9:34 AM said:
>
> > I'm rewriting a lot of code and have decided to use classes... I'm
> > wondering if this would be considered bad design or not...
> [snip]
>
> /Sounds/ like a good idea. Are you really going to end up with an array
> of errors? Wouldn't you normally stop operation on the first error? Or
> at the very least report back to the user on the first error*?
>
> Maybe you could do something like this...
>
> function doYourThing($this)
> {
>   if(!empty($this))
>   {
>   if($this == $that)
>   {
>   // do this stuff
>   }
>   else
>   {
>   // do this instead
>   }
>   }
>   else
>   {
>   return error(400);
>   }
> }
>
> error($err)
> {
>   switch ($err)
>   {
>   case 100:
>   $error = "you suck!";
>   break;
>   case 200:
>   $error = "jo mama!";
>   break;
>   ...
>   case 400:
>   $error = "var empty";
>   break;
>   }
>
>   return $error;
> }
>
>
> Pretty close to what you were going to do, just slightly different.
>
>
> hth,
> chris.
>
> * By error I mean something catastrophic like someone messing with the
> values in the querystring or a variable containing data you were not
> expecting. I don't mean someone forgot to fill in their last name on
> your registration form.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] trying to match the front and end...

2003-08-14 Thread Dan Joseph
Hi,

> Not tested, mind you. I know what you're saying, too. How is _all_ of
> that code better(worse?) than one simple regex? Benchmark it and see.
> You'll be surprised how a lot more code with simple string functions
> will be considerably faster than a complex regular expression. Your
> results may vary, though. :)

Ahh, you do have a very valid point there.

I tweaked your regex as stated in your follow up post, and mike's, they
both work now.  I'm gonna test a non-regex method.  Performance is a factor
in this.  I'll post my results in a day or two when I get it situated.

Thanks to you both!

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] trying to match the front and end...

2003-08-14 Thread Dan Joseph
Hi,

> > In a nutshell, what I want to do is chop off the front and the back.
> > Example:
> >
> > I have: 1234567890
> > I want: 456
> >
> > I have a start num and an end num.  start = 123, end = 7890.
> >
> > This is working fine as I have it above, however I'd like to combine
> > it into one regular express, instead of two.  Can someone give me an
> > example of matching the beginning and end at the same time?

>From Mike:

>$middlenum =
> preg_replace("/^${this->start_num}(.*)${this->end_num}$/", '$1',
> $this->ach_acct_num);

>From John:

> $new_number =
> preg_replace('/^'.$this->start_num.'([0-9]+)'.$this->end_num.'$/',
'\\1',$old
_number);

The one that Mike gave didn't seem to do anything, John's will work if it
can match the beginning and the end successfully.  I should probably explain
myself further.

Sometimes there won't be anything to replace at the front, and sometimes
nothing at the end.  So it'd still need to do the front and/or end wether or
not they both exist.

Is there a way to tweak these to do that?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] anyone have any idea as to how to display a message after a page has started loading??

2003-08-22 Thread Dan Joseph
Hi,

> I am looking for a way to say please wait generating thumbnails... while
> actually doing so.  I have tried calling the JavaScript alert() function
> before starting the image processing but it waits for the page to
> complete loading before displaying the alert box.  anyone have any ideas
> on this??  BTW: at the time I am trying to display a message I have
> already started output to the browser.

Try looking up the flush() function on php.net.  That _might_ do what you
want.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHPSESSID Handling...

2003-04-01 Thread Dan Joseph
Hi Everyone,

I'm working on securing my application, and am running into a slight issue
that I cannot seem to find a fix for. If the attacker changes his PHPSESSID
cookie to contain illegal characters, it causes an error on the screen upon
session_start().

How can I check to see if this is a valid number, and if it is not, exit the
application?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Auto escalation

2003-04-01 Thread Dan Joseph
Hi,

Actually, it sounds to me like he wants to escalate trouble
tickets.  I've done this before.  Simply:

1. Make a cron that monitors the time, and when a ticket was
last touched.
2. Base it on seconds, set it to automatically set the status to
a certain level after so many seconds.
3. When some levels are hit, and you want more features, just
simply code them.  I had it e-mail the Ops Manager when it hit level 4
(48 hours of no touches).

Lemme know if that doesn't help.

-Dan Joseph

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2003 11:30 PM
To: 'Praveen Kumar'; [EMAIL PROTECTED]
Subject: RE: [PHP] Auto escalation

> Dear All,
>  I'm new to the list. I'm intended to use the auto escalation
> functionality in my current project which is related to helpdesk. Can
> you please give me some suggestions about how to develop this. I'm
using
> PHP, MySQL

If I'm guessing correctly, you mean auto_increment. There are plenty of
examples in the manual (it's a mysql feature, not PHP). Please start
reading there and come back if you have a specific question about your
project. You'll probably want to make use of the mysql_insert_id()
function in PHP. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Opinion on a method....

2003-04-04 Thread Dan Joseph
Hi,

I would like to get some opinions here on a method I'm doing to grab connect
information for a mysql connection.

Currently I am doing: $pinfo = fopen ("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?  Is
there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Opinion on a method....

2003-04-04 Thread Dan Joseph
Ahh, good thought.  I also have it outside the web site directory tree.

-Dan Joseph

-Original Message-
From: Bryan Lipscy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:14 PM
To: 'Dan Joseph'; [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Put the connect info into a php file (i.e. connect.php).  
If it is ever directly accessed by the client the PHP engine will render
a blank page.
If your ini file is ever accessed by the client it will render the
contents of the ini file.

Wonder if removing rwx would adversly affect includes to this php
file..

-Original Message-----
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Opinion on a method


Hi,

I would like to get some opinions here on a method I'm doing to grab
connect information for a mysql connection.

Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?
Is there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Opinion on a method....

2003-04-04 Thread Dan Joseph
Hi Jon,

the ini file looks like:

hostip&user&password&databasename

after I import it, I split it up, and assign each to a variable name.

I also have it outside the doc root, and it gives a generic error msg for
every error in the system (db related, or not).

Should this do it?

-Dan Joseph

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:20 PM
To: Dan Joseph; [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Hi Dan,

> I would like to get some opinions here on a method I'm doing
> to grab connect information for a mysql connection. Currently
> I am doing:
>   $pinfo = fopen ("/director1/directory2/filename.ini","r");

Does this filename.ini contain the code to connect to your database? If so,
I usually do two things with this file:

1. put it outside the document root, so users can't browse to it
2. put any code that might output something (an error message, for example)
inside a function, so even if it is run, nothing will happen - you need to
include() it and then call the function yourself.

If it's just connection information, with no code (I'm a bit confused by the
.ini extension :-) then just make sure it's somewhere outside your document
root.

> Is XML a solution?

I don't think XML is inherently any more secure than plain text - it's all
down to how you store and transmit the data.

Cheers
Jon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Opinion on a method....

2003-04-04 Thread Dan Joseph
Hi,

Thanks to everyone for the input.

Reason I'm not using an include is simple.  The file does not contain any
variables, it just has a line of text that is & delimited.  I guess I was
just looking at the include() method as insecure.  I can see how it wouldn't
be now.

Thanks to everyone!

-Dan Joseph

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 3:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Hi Dan,

> the ini file looks like: hostip&user&password&databasename
> after I import it, I split it up, and assign each to a variable
> name. I also have it outside the doc root, and it gives a
> generic error msg for every error in the system.

Should do it - it's a bit of a long-winded route, though.

As Kevin said, why not just use include()? It'll be a lot easier and just as
safe :-)

Cheers
Jon


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Allowing punctuation marks in regular expressions

2003-06-06 Thread Dan Joseph
Hi,

>   return (preg_match("/^[a-z0-9]+$/i", $string));

That a-z0-9 is where you can do it.  Just add ! or . or ? to the end:

a-z0-9!?.

Also, if you want upper case letters, make sure you add A-Z:

A-Za-z0-9!?.

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] secure code

2003-05-29 Thread Dan Joseph
Tim,

Make sure you handle all exceptions, exit() after each redirect, make sure
you are validating all form fields before it goes into the database, things
like that.  Might want to grab webproxy from www.atstake.com and use it to
test your app.  Its kind of complex to use at first, but there should be
some docs online.

-Dan Joseph

> -Original Message-
> From: Tim Burgan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 27, 2003 7:52 PM
> To: PHP Lists
> Subject: [PHP] secure code
>
>
> Hello,
>
> I'm wondering if you can recommend any resources that discuss
> writing secure
> code and how to put the best methods in place to prevent hackers.
>
> I'm particularly looking at resources from the web coding perspective, not
> securing a server.
>
> Or, what things to you do to 'block' hackers.
>
> Thanks
> Tim Burgan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] session_regenerate_id()

2003-05-30 Thread Dan Joseph
Hi,

I know this function is new, however, does anyone have any documentation on
it?  There is nothing on php.net...

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] A good function

2003-05-30 Thread Dan Joseph
Hi,

Have a look at: http://us2.php.net/manual/en/function.ereg-replace.php

That might do what you want.

-Dan Joseph

> What is a good function for striping white space and removing 
> \\..\..  and possible ","  Anything that would be considered 
> unwanted user input???  
> 
> I looked at trim() but its doesnt do all the things I need it to do.  


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: PHP OOP x Procedural Performance

2003-05-30 Thread Dan Joseph
Hi,

From my personal recent experience, I can tell you that processing a lot of
echo's thru classes is a heck of a lot slower than just doing it the normal
way.  Although I wouldn't have done this particular project any other way, I
do with that I could get it to display faster.  Its not a big deal, just
bugs me.  Its really personal preference though.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] CR in MySQL?

2003-05-31 Thread Dan Joseph
> How do you put a carriage return in a MySQL database and have it 
> display as a line break on the web page?

str_replace ("\n", "", $var);

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] CR in MySQL?

2003-05-31 Thread Dan Joseph
Hi,

> > str_replace ("\n", "", $var);
> >
> > -Dan Joseph
> >
>
> Is CR == NL?  What's wrong with nl2br()?

Beats me, is it?  nothing wrong with it I guess, I just didn't know about
that function.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] CR in MySQL?

2003-05-31 Thread Dan Joseph
Hi,

> Just did a bit of checking..
>
> NL == ASCII 010, CR == ASCII 015..

Ahh ok, so nl2br() would work.  Cool, I guess you learn something new
everyday.  Is there a one for CR's?  I noticed cr2br() wasn't listed in the
manual.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] file output, columns, etc...

2003-06-05 Thread Dan Joseph
Hi All,

Need some help here.  I have to format a line with each piece of the line
being a fixed set of characters in length, wether its a mix of spaces and
letters, or all letters.  Here's an example of the line:

06?4111ABDALARM333 N COUNTRY CLUB  CANTON   DD8

In this file, for instance, CANTON's space on the line has a length of 13
characters.  If 'CANTON' is not 13, I have to fill with spaces.  Is there
some sort of report formatting functions or osmething I can look at to lay
out the structure of the line and then drop in variables to it and have the
line format itself w/o me having to calculate the length of each variable
and put spaces at the end accordingly?  I've tried search, but I don't have
a clue what I am really looking for.  Help is appreciate.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] file output, columns, etc...

2003-06-05 Thread Dan Joseph
Hi John,

> -Original Message-
> > Need some help here.  I have to format a line with each piece
> of the line
> > being a fixed set of characters in length, wether its a mix of
> spaces and
>
> printf() or sprintf() should do what you want...

That did the trick, thanks!  I haven't had much use for sprintf, and I
didn't realize it formated things quite like that.  I appreciate the help.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] new line question

2003-06-05 Thread Dan Joseph
hi,

print (4+5) . "\n";
print ($num1 + $num2) . "\n";

-Dan Joseph

> -Original Message-
> From: Meay Santiglia [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2003 2:40 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] new line question
> 
> 
> Hi there,
> I'd like to put a line between output of 9(4+5) and
> 31(8+23).\n doesn't seem to work with numbers.
> Thanks,
> _--
> test.php 
>  $num1=8;
> $num2=23;
> print "Hello my friend!\n";
> print (4+5);  
> print ($num1 + $num2);
> ?>
> 
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Migration once again

2003-06-05 Thread Dan Joseph
Hi,

try changing your echo line to echo ' and then "; to ';

-Dan Joseph

> -Original Message-
> From: Øystein Håland [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2003 3:16 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Migration once again
>
>
>
> "R'Twick Niceorgaw" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > Are you echoing the javascript ?
> Exactly, it is echoed like
>  echo "
> //lots of code
> 
> <!--//
> function openPrintCloseWindow(){
>
> myWin=window.open(\"$_SERVER[PHP_SELF]?skrivut=yeah&target=$target
> \",\"print
> out\",\"scrollbars=yes,status=yes,screenX=0,screenY=0,WIDTH=640,he
> ight=500\"
> );
> }
> //-->
> 
> ";
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Migration once again

2003-06-05 Thread Dan Joseph
Hi,

> > myWin=window.open(\"$_SERVER[PHP_SELF]?skrivut=yeah&target=$target

Actually, I see. the problem...  that should read:

myWin=window.open(\"' . $_SERVER['PHP_SELF'] .
'?skrivut=yeah&target=$target

also, use:

echo '

and

';

that will fix it.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] how to make php working with asp?

2003-06-10 Thread Dan Joseph
Hi,

> -Original Message-
> I want to using asp in a php file,how to do it?
> thanks!

As far as I know, that is not possible.  ASP and PHP are two different
languages.  It would be like someone programming an application in both C++
and Java at the same time.  If there is no reason for you to have to use
ASP, then just use PHP by itself.  If you must use ASP, you'll just have to
use that.

-Dan Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] MSSQL - Previous/Next Paging Results

2003-06-10 Thread Dan Joseph
Hi,

> -Original Message-
> MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc
>
> Anyone know of articles/examples that specifically deal with this issue?

Look into the Top() function for MSSQL.  It goes something like:

SELECT Top(10) * FROM table

You should be able to find some info under the msdn.microsoft.com page.
Or, MS has several hundred newsgroups, they should have one for MSSQL.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Generate PHP using PERL???

2003-06-10 Thread Dan Joseph
Hi Todd,

> -Original Message-
> My question.  Is it possible to dynamically generate a page using
> a PERL script that will in turn be interpreted as PHP by the
> server since I dont/wont have the option of ending the filename with PHP.
>
> My hope is that their is some directive that I can output at the
> start that will invoke the PHP interpreter so that my output will
> be run as a PHP script rather than just HTML.

Its kind of ugly, but its possible to call a php script thru a system()
function in Perl.  You could write a php script to do the resize work for
you, and call it like...

system ('/usr/local/bin/php resize.php');

... in Perl.  I don't prefer doing these kinds of things, but I guess I
don't personally have a better solution to your problem.  Maybe someone else
does?

-Dan Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Best PHP books

2003-06-10 Thread Dan Joseph
Hi,

I'll scond the O'Reilly books.  I have Programming PHP and Web Apps w/PHP &
MySQL -- both are excellent.  Since you've went through one book, also keep
in mind www.php.net is a great reference tool.

-Dan Joseph

> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2003 3:01 PM
> To: Jay Blanchard
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Best PHP books
>
>
> I myself use PHP BlackBook and started off on that
> got me this far and still keeps me going.
> HTH
>
> Cheers,
> -Ryan
>
>
>
> - Original Message -
> From: "Jay Blanchard" <[EMAIL PROTECTED]>
> To: "Brian @ BHTSystems" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, June 10, 2003 6:49 PM
> Subject: RE: [PHP] Best PHP books
>
>
> > [snip]
> > Does anyone have any recommendations for a good PHP book?
> >
> > I tried the "Learn PHP in 24 hours" book, but it was incredibly light on
> > details. I'm looking for a book that has at least a complete function
> > reference and is geared towards the intermediate to advanced level
> > programmer.
> > [/snip]
> >
> > I like O'Reilly's PHP Cookbook.
> >
> > Jay
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] shorthand "if" notation

2003-06-11 Thread Dan Joseph
Hi,

> -Original Message-
> I am confused by the shorthand "if" notation.
> For example I just saw this PHP snippet on another forum

Basically:

(condition) ? true : false;

Example:

$var == "red";

($var == "red") ? echo 'true' : echo 'false';

You'll find this comes in handy with things like printf and other places
like that.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] array sort help...

2003-06-11 Thread Dan Joseph
Hi,

I cannot figure this out...  Need some assistance.

I have an array:

$jack[#] = array(
"loan_info" => 101,
"first_name" => jack,
"last_name" => mother
);

# = 0 thru 12

I want to sort the array by loan_info.  Could someone please explain this
to me?  I kind of understand array sorting, but I am still lost...

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Good PHP Books

2003-06-16 Thread Dan Joseph
Hi Mark,

I can't really recommend one, but I can recommend going to
www.journeyed.com and checking out what books they have there.  They are a
retailer to students, and their books are mostly designed for classroom
teaching.  I'm sure you could find something there that would fit your
needs.

-Dan Joseph

> -Original Message-
> From: Mark McCulligh [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 16, 2003 10:25 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Good PHP Books
>
>
> Hi Other PHP Users,
>
> I have been asked to teach an introduction course on PHP/MySQL at my local
> College.
>
> I am looking for a good beginner book for the course. Like most people I
> learned PHP from php.net and online tutorials. But I need a book for the
> course.
>
> I am looking for a book that is not too long also. Around 500-600 pages
> would be great. I can't give my students 150 pages every night to
> read, for
> books like "PHP and MySQL Web Development" by Luke Welling, Laura Thomson
> even know they are great they are just to long. It is only a 35
> hour course
> for only can cover the basics.
>
> Plus something that covers version 4.2 or greater.  I don't want to teach
> them old syntax.
>
> If anyone knows for a good beginner book, please let me know, thanks.
> Mark.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] functions, opinion...

2003-06-16 Thread Dan Joseph
Hi,
 
Just kind of curious what people think.  In your opinion,
should a function avoid output?  What I mean by that, is should a
function on "do something" without having echo or printf commands in it?
This is something I've been thinking about lately to improve my
programming style.  Opinions?
 
-Dan Joseph
 


RE: [PHP] functions, opinion...

2003-06-17 Thread Dan Joseph
Hi,

> > My personal opinion, which shows in all my code writing is to
> never echo
> > inside a function. always return the data whether it be string, array,
> > or boolean... I've always left echoing up to the actual page
> showing the
> > data. That way if you have two seperate pages that need to display the
> > data differently, you can use the same function, and just format it as
> > needed on the pages.

This is kind of what I thought would be the majority of the responses.
I've found that since the inception of web languages (ASP, PHP, etc) that
I've "abused" functions a bit.  I then got to thinking one day that maybe
what I was doing was normal, but then I figured that it probably wasn't.  At
times it seems like it caused me to scramble all my logic.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] functions, opinion...

2003-06-17 Thread Dan Joseph
Hi,

> Depends on the use of the function. (Output functions should produce
> output shouldn't they?!) Best option probably is to specifiy an argument
> that allows to choose wether to output or to return.
> If you return text you should return by reference to prevent unnecessary
> memory consumption.

Recently, I have been doing more of returning than echoing from inside a
function.  I found it more useful I guess.

Seems the general consensus is to simply keep the echoing from the
functions most of the time, and in some minor cases, use it.  To me, this
makes sense.

Thanks all for your opinions.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Naming a variable with a variable

2003-06-17 Thread Dan Joseph
Hi,

> Ho can I create (name) a variable with other variables value?
> 
> If $foo = "bar";
> 
> then the variable I want to create is $bar.

$$foo = "blah";

that will set $bar equal to blah.

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Dan Joseph
Hi,

> $report = "key:".$index." => ".$value."\n";

actually, shouldn't it be:

$report .= "key:".$index." => ".$value."\n";

If you don't have the . there, its going to keep overwriting the report,
and thus writing only the last $report item that was built.  .= would concat
'em all together.  Am I misunderstanding?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] switch structure...

2003-06-19 Thread Dan Joseph
Hi All,

Looking for some guidance on something I want to be able to do with switch,
and I don't think it exists, but I'd like to consult the list as a last
resort.

I have a switch setup similar to:

switch ($step) {
case 0 :
blah...
break;

case 1 :
blah...
breakl
}

Under case 0, I'd like to do a few things, and then if a certain condition
is met, move into case 1.  Is this possible?  Am I off the wall here?  Is
there a better way of doing this madness I've come up with?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] switch structure...

2003-06-19 Thread Dan Joseph
Hi,

> Just do a conditional break.

> case 0:
>   blah blah blah.
>   if (my condition == false)
>   break;
> case 1:
> blah blah ..

Oh...  you know, I've gotta stop leaving my brain at home.  Thanks Chris,
R'twick..  It sure is a relief to know that this list is here when I'm
having bad PHP days..  which lately, is everyday...  This solved my problem
perfectly.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Month loop

2003-06-19 Thread Dan Joseph
Hi,

> Is there any way I could loop thru and print all the month names (i.e.
> January, February)?

I suppose you could do something like:

for ($i = 1; $1 >= 12; $i++) {
echo date("F", mktime(0, 0, 0, $i, 1, 2003)) . "";
}

Unless you just want to manually create an array with the month's names in
it.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Cookies- peanut butter or chocolate??

2003-06-19 Thread Dan Joseph
Hi,

> > 1. How do you setup a cookie that will not expire??
>
> You can't

 however you could just set the year into the distance future a few
years.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Chomp, Chomp, Chomp

2003-06-23 Thread Dan Joseph
Hi,

chop and rtrim just take out white space.  Perl's chomp takes off the last
character no matter what it is.

$foo = substr($foo, 0, -1);

That will emulate Perl's chomp.

-Dan Joseph

> -Original Message-
> From: Sparky Kopetzky [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 20, 2003 6:38 PM
> To: PHP General
> Subject: [PHP] Chomp, Chomp, Chomp
>
>
> Does anyone have a piece of code that emulates a Perl 'Chomp'
> function? I need one.
>
> Thanks in advance!!
>
> Robin E. Kopetzky
> Black Mesa Computers/Internet Services
> www.blackmesa-isp.net
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] - Default Date

2003-06-23 Thread Dan Joseph
www.php.net has a few useful things on there, one of them is the date()
function.

-Dan Joseph

> -Original Message-
> From: Gary Ogilvie [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 23, 2003 9:22 AM
> To: 'PHP General'
> Subject: [PHP] - Default Date
>
>
> Hi everyone,
>
> I am about to start work on a PHP script and I need to know how to
> today's date. Is there a default variable built into PHP that has
> today's date?
>
> Many thanks
>
> Gary Ogilvie
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Date problem

2003-06-23 Thread Dan Joseph
Hi,

That looks like a unix timestamp.  Try this:

Echo date("Y/m/d h:i:s", "1056044640");

www.php.net/date

Check that link to see the lettering codes and the syntax, I
might be off on what I typed up there, but you'll get the concept.

-Dan Joseph

-Original Message-
From: Logan McKinley [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2003 5:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Date problem

I am storing dates in an Access database in a field with a "Date/Time"
Type
the date is being generated using date("n/d/Y  h:i a").  It appears to
be
stored in Access correctly but when I output it to the page using PHP it
seems to be changing.  It is being stored in the database as "6/19/2003
1:44:00 PM" but being displayed on the page as "1056044640"
Thanks in advance,
~Logan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Session problem

2003-06-24 Thread Dan Joseph
Hi,

> I have a problem with php sessions. The following code works on my home PC
> but doesn't work on my office PC. What can be the problem?

Its possible you have cookies turned off on your office PC.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] validation library?

2003-06-25 Thread Dan Joseph
Hi,

> Can any point me to a nice GNU php validation library?
> Looking for something thats strips bad user input and validates email,
> tel etc etc...

I don't have a link to a library, but, here's a function to validate e-mail
addresses:

if (!ereg ("^[^@ [EMAIL PROTECTED]@ ]+\.[^@ \.]+$", $_POST["email"])) {
$error = 1;
$msg  .= "Invalid e-mail address.";
}

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Print '\n' not working

2003-06-25 Thread Dan Joseph
Hi,

> I am using PHP 4, Apache, but the '\n' is not going to the next 
> line during
> a print.  Has anyone else encountered this anamoly.

in the case of:

echo 'blah\n';

I've noticed it doesn't work.

In the case of:

echo "blah\n";

I've noticed it does work.  The difference?  ' and ".  

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Securing PHP code

2003-06-25 Thread Dan Joseph
Hi,

> 2) I store the db password and login info in a database.inc.php
> file. Is there any way I can prevent a person from getting the db
> pass even after he gets this file?

Store that file outside the docroot.  That way there is no chance they can
get it from the web site.  I myself use an ini file that is no where near
the docroot, and use parse_ini_file() to load the DB information in, and
then I connect to it.  This method passed our security audit with flying
colors.

A sample of what my ini file resembles is:

[mysql_info]
host = 192.168.1.1
uid = username
pwd = password
dbn = database

They end up in a $INI array, and the fields are $INI['host'], $INI['uid'],
etc..  You can read more about that function @ www.php.net.

> 3) Does anyone know a book that focuses of writing secure code.

I haven't found one, but if you do, pelase share it with the rest of us.  I
wouldn't mind having one.

Also, make sure you're battling cross-site scripting.  I had a problem
where the EU could toss javascript into the comments field, or any field,
and it would give 'em their cookie and they could go play.  They could also
cause other bad things to happen.

Validate all your form variables.

I found avoiding method=get in my forms helped.

TURN OFF register_globals IN THE PHP.INI FILE!  This is a big one.

Make sure you're handling all your exceptions, errors, and exit() the
script after your header redirects and things like that.

That should get you started...

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Securing PHP code

2003-06-26 Thread Dan Joseph
Hi,

> Why rely on some access restriction when you don't have to? You
> include code
> using a filesystem path. There is no need for it to reside under
> document root.
> Yes, you can make it so that certain things are not served
> directly by the Web
> server, but why take the extra risk? You gain nothing. What if you make a
> mistake? What if you install a new version of Apache and that
> file accidently
> gets served raw?

Right.  Also don't forget, there have been exploits in the past, and there
will be in the future that will allow a hacker access to your docroot (not
necessarily the entire system) through the web browser, and they can
download all those files.  Why leave the database connection information in
there for him?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Securing PHP code

2003-06-26 Thread Dan Joseph
Hi,

> The only reason that I was so adamant about it was I had a 'heated'
> discussion with a business associate who's server was compromised - and he
> was, lets say, insistant that the fact that there were database
> passwords in
> a php file inside the webroot was the reason it was insecure.  I
> just wanted
> to know if I was wrong in saying that the passwords were not compromised
> without the server access being compromised
>
> (not to mention the clear text password accesses, the wildcarded mysql
> access on a remote host passed in clear text, the lack of ssl on pages
> collection cc information, same root passwords across the network and
> dictionary hackable passwords for users :)  Oh, and did I mention the non
> ssh telnet access from internet café's?)

Wow!  Sounds like you have more important issues to worry about then where
you have your mysql connect info!

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] if else if statement failed...

2003-06-26 Thread Dan Joseph
Hi,

>Noticed something interesting.  I was helping to debug someone's
> programming problem and found that if there is to many 'else if' in the if
> and else statement then it doesn't work.  Have anyone encoutered this
> problem and know of a workaround to it?

That sounds kinda bizzare, how many elseif's did you have?  also, were you
using 'else if' or 'elseif'?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Certification

2003-06-27 Thread Dan Joseph
Hi,

> basis is way beyond what any of us have time for and personally I find the
> value of such certification programs extremely questionable.

Questionable?  Did you mean useless?  Honestly, I've got a friend with a
CCNA, he's sitting in an ISP's call center answering phones.  He doesn't
have a degree, and no one wants to talk to him.  I also have a relative who
recruits for Microsoft.  They told me that the MCSD is meaningless.

On a more positive note, there are several sites that I've run accross that
offer PHP certifications.  I believe www.brainbench.com is still around.
They're the only one that I can think of off hand.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP-programmers salary

2003-06-27 Thread Dan Joseph
Yo,

> Can anybody tell me what is the avarage PHP-programmers salary?

www.salary.com

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Variable from the form

2003-06-30 Thread Dan Joseph
Hi,

> I'm getting result from the form. Are there any differences between
> using these 2 forms:
>
>
> $_POST['my_variable']
>
> or just
>
> $my_variable
>
> Is it more safety to use the first one?

You have to use the first one if you have register_globals set to off.  If
you have it on, you can use either, however, the second is more insecure.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] php5 and mysql licences

2003-06-30 Thread Dan Joseph
Hi,

Is the mysql client library going to be put back in for future betas?  Or
are we mis-reading the change log and its still there?

-Dan Joseph

> -Original Message-
> From: Derick Rethans [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 30, 2003 1:05 PM
> To: Christopher Speer
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] php5 and mysql licences
>
>
> On Mon, 30 Jun 2003, Christopher Speer wrote:
>
> > i just read the news on php.net and wondered what it says about php5 and
> > MySQL.
> > They say that the libs for using a mysql server are not implemented any
> > more,... so my question is: does that mean i (we) have to buy
> the licences
> > to be allowed to use the mysql libs for php?
>
> No, that is not true. You will only need to buy a MySQL license if your
> script uses PHP's MySQL 4.x support (ie, linking to libmysql 4.x), you
> distribute your script AND you do not want to distribute your set of
> script under the GPL license (but under for example the BSD license or a
> commerical license).
>
> regards,
> Derick
>
> --
> "Interpreting what the GPL actually means is a job best left to those
> that read the future by examining animal entrails."
> -
>  Derick Rethans http://derickrethans.nl/
>  International PHP Magazine  http://php-mag.net/
> -
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Regular Expression

2003-07-01 Thread Dan Joseph
Hi Everyone,

I am currently using this piece of code to validate wether or not an
address has only letters, numbers, #, or - in it:

if (!ereg("^[A-Za-z0-9 #-]{1,20}", $_POST["address1"])) {
$error = 1;
$msg  .= "Address must only contain letters, numbers, #, or -.";
}

However, if I put any valid character as the first, and then any illegal
characters ([EMAIL PROTECTED], etc) after that, it passes it as ok.  Can someone tell 
me
what I am doing wrong with the regex?

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Regular Expression

2003-07-01 Thread Dan Joseph
Hi,

> It's not so much that your regex is wrong, but there are other functions
> that you may want to use, such as is_numeric(), is_integer(),
> is_string() (there is a good example of checking for an alphabetic
> string on the php site)

That would have been my first choice also, however, with the # and - being
legal, things like ctype_alnum and others don't work out.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Regular Expression

2003-07-01 Thread Dan Joseph
Hi,

> You're only checking for valid characters at the *start* of the
> string, you
> need to check to the *end* of the string as well:
>
>   "^[A-Za-z0-9 #-]{1,20}$"
>
> ought to do it.

It sure did do it.  Thank you!  I didn't realize that the $ did that.
Thanks for the info.

-Dan Joseph


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Regular Expression

2003-07-01 Thread Dan Joseph
Hi,

That might actually be a good solution for another item I'm working with.
Thanks for the tip.

-Dan Joseph

> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2003 10:10 AM
> To: Dan Joseph; [EMAIL PROTECTED]
> Subject: RE: [PHP] Regular Expression
>
>
> [snip]
>   That would have been my first choice also, however, with the #
> and - being
> legal, things like ctype_alnum and others don't work out.
> [/snip]
>
> Here is an example of something that I did before;
>
> $alphachar = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
> $ld1alpha = strspn($ld1, $alphachar);
> if(strlen($ld1) != $ld1alpha){
>   $err[$i] = "The LD1 may only contain alpha characters.\n";
>   $i++;
> }
>
> int strspn ( string str1, string str2) - Returns the length of the
> initial segment of str1 which consists entirely of characters in str2.
> You could add - and # to $alphachar
> Now, in this case $ld1aplpha would be the same length as the string
> length of the input field where the characters are contained in
> $alphachar. This is used as one of the steps in a
> verification/validation procedure on a large internal form.
>
> Just another solution to the problem
>
> HTH!
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Can't use strtotime for dates before 1970. Why not??

2003-09-10 Thread Dan Joseph
Hi,

Unix time stamps are based on the number of ...minutes/seconds (one of the
two)... between 1/1/1970 and Now().

-Dan Joseph

> -Original Message-
> From: Free Grafton [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Can't use strtotime for dates before 1970. Why not??
>
>
> I¹ve been on this list for a short time so my question may have been
> answered, but if someone could direct me to a satisfying answer,
> it would be
> greatly appreciated.
>
> We provide a MySQL, PHP solution to customers. One of the fields that we
> store for the customers are birthdates. We just recently upgraded from Red
> Hat 7.1 to Red Hat 9.0 and now have realized that at version 7.3 they
> changed it where strtotime no longer shows values before 1/1/1970 as
> negative values. It nows creates a ­1 error. Thus, we are now
> left with any
> individual over the age of 33 to not be able to calculate their birthdate.
> This is quite frustrating as there are no other functions that can handle
> this that we have found. I have looked around the PHP boards and
> it appears
> that individuals are having to build custom functions to handle
> this and are
> also frustrated with this issue.
>
> So, my question is, does anyone have any solutions we can use,
> know where to
> find one, know if this issue will ever be addressed, etc. Thanks for your
> time and knowledge.
>
> Free Grafton
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP|Con insane pricing

2003-09-16 Thread Dan Joseph
Hi,

I know a couple people who put together a Con once.  It wasn't a large one,
it only took up one hotel conference room, and the budget was kept low.  The
least he could sell tickets for was $250-$300 (somewhere in there) each.
That was without him turning a profit.

Now, take into account a con like this one wtih keynote speakers (most
likely paid), a large staff, a larger room (and probably multiple rooms),
more food, more drinks, more advertising, and $495.  That really isn't that
bad.  Expensive yet, but you have to ask yourself if the value is worth it
for you.

-Dan Joseph

> -Original Message-
> From: Chris Sherwood [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 15, 2003 6:19 PM
> To: Dan Anderson; [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP|Con insane pricing
>
>
>
> Yea its not bad if you dont have a life outside of programming and/or
> computers
>
> if you have kids or other responsibilities then all of a sudden
> 500$ becomes
> a very large issue as thats a months groceries or what not...
>
> heh yea the average salary is 50K but then when the government
> takes 40% (if
> your canadian) that is not a whole lot
>
>
> > > The pricing seems insane, and geared towards people with lots of
> > > spare money...
> > ::snip::
> > > but I'm not going to shell out $495 (the cheapest non-student
> >
> > If you consider the average salary for a computer programmer is probably
> > $40k - $50k (at least in the US) this is not insane.  (Heck, it's less
> > then a weeks pay -- even with the plane tickets).  I assume this covers
> > hotel rooms (pricey), food (pricey), speakers (very pricey), etc.
> >
> > -Dan
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP|Con insane pricing

2003-09-16 Thread Dan Joseph
Hi,
 
> > at least I dont live in a police state.

I sure do..  Its a joke too..

> I hate the patriot act.

You don't like illegal search and seizures?  What's wrong with you? :)

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP|Con insane pricing

2003-09-16 Thread Dan Joseph
Hi,

Probably depends on location.  My friend's was in Chicago, so everything was
a little more expensive.

-Dan Joseph

> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 16, 2003 9:39 AM
> To: Dan Joseph
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP|Con insane pricing
>
>
> I don't know, the Ottawa Linux Symposium runs in Ottawa Canada each
> year. They usually run about 5 days and rent multiple rooms. The cost to
> non-students (this year): $325 CAD ($217 USD). That's less than half the
> price of PHP|Con.
>
> Cheers,
> Rob.
>
>
> On Tue, 2003-09-16 at 09:31, Dan Joseph wrote:
> > Hi,
> >
> > I know a couple people who put together a Con once.  It wasn't
> a large one,
> > it only took up one hotel conference room, and the budget was
> kept low.  The
> > least he could sell tickets for was $250-$300 (somewhere in there) each.
> > That was without him turning a profit.
> >
> > Now, take into account a con like this one wtih keynote speakers (most
> > likely paid), a large staff, a larger room (and probably
> multiple rooms),
> > more food, more drinks, more advertising, and $495.  That
> really isn't that
> > bad.  Expensive yet, but you have to ask yourself if the value
> is worth it
> > for you.
> >
> > -Dan Joseph
>
> --
> .-.
> | Worlds of Carnage - http://www.wocmud.org   |
> :-:
> | Come visit a world of myth and legend where |
> | fantastical creatures come to life and the  |
> | stuff of nightmares grasp for your soul.|
> `-'
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Dan Joseph
I got a few of those returns also.  I also apparently launched an attack on
the computer web server.  Kinda hilarious if you ask me.  Good excuse to
install Norton also.

-Dan Joseph

> -Original Message-
> From: Curt Zirzow [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 19, 2003 11:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Attention: List Administrator
>
>
> * Thus wrote Chris Sherwood ([EMAIL PROTECTED]):
> > To Whom it may concern the following users
> >
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> >
> > has been flooding me with viruses. fortunately I have the
> appropriate safeguards in place.
> >
>
> Yes, I was just about to contact the list admins about this.
> Although I have gotten virus attatchments from other people as
> well.
>
> And now I'm getting an autoresponder from someone's server saying
> that I sent them a virus... egads... this is crazy :)
>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Attention: List Administrator

2003-09-19 Thread Dan Joseph
Hi,

> s/Norton/linux+qmail/

haha..  that be a good solution for sure!

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 3 mins of your time please...logic problem

2003-09-24 Thread Dan Joseph
Hi,

Another way to restrict them to one vote is to set a cookie.  Although not
completely full-proof, its a method I've seen a lot of them use.

-Dan Joseph

> -Original Message-
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 24, 2003 1:54 PM
> To: Ryan A; [EMAIL PROTECTED]
> Subject: Re: [PHP] 3 mins of your time please...logic problem
>
>
> From: "Ryan A" <[EMAIL PROTECTED]>
>
> > Basically trying to limit the "vote" to just 1 per person, first am
> checking
> > if the the person with username has voted, if that comes back as false
> then
> > am checking his ip (because i dont know if  the person changed his
> username
> > and is trying to vote again) now its allowing me to vote twice
> and on the
> > third time its restricting me.
>
> Just get rid of the check for IP address. All you're going to do
> is restrict
> a bunch of people that actually haven't voted just because they have the
> same IP address as someone else. Some ISPs have it so that all
> requests look
> like they are coming from the same IP address while it's actually
> different
> people.
>
> If your "poll" is really so important that you need to limit people from
> voting twice, then make them log in and only allow one vote per username.
>
> ---John Holmes...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] 3 mins of your time please...logic problem

2003-09-24 Thread Dan Joseph
Hi,

> > Another way to restrict them to one vote is to set a 
> cookie.  Although not
> > completely full-proof, its a method I've seen a lot of them use.

Ok, let's examine the part where I said its not full-proof...  

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] printf....

2003-10-01 Thread Dan Joseph
Hi Folks..

printf ("










Search


by Borrower



by Loan
Number












", $_SERVER['PHP_SELF']
);

I have that code, and I get this error:

Warning: printf(): too few arguments in /home/sites/site8/web/index_test.php
on line 34

I cannot for the life of me figure out what the problem is.  I've looked
thru archives, examples, and pages of a book all about printf, and this just
doesn't add up to me..  Anyone see the problem?

-Dan Joseph

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   >