Re: How to check for multiple @'s



<affiliateian@xxxxxxxxx> wrote in message
news:1159378729.124628.218680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Ron Barnett wrote:
substr_count($CClist, '@')

will return the number of @ characters in $CClist

check out the PHP manual at PHP.net

THanks for the reply Ron.

Unfortunately, I am a newbie programmer and am having a tough time
making sense of the manual at PHP.net.

I can see hwo checking for the # of @'s will lead to a few statements
like if > 1 then blah. But am still lost as to actually coding this
into our current sciprt. Any more hints / tutorials / help for a newbie
in php?

all you need to do is check to see if there is more than your allowed number
of CCs in the list

I'm assuming you have the headers available in a string somewhere, if not
the task will be difficult to explain.

If you send me a mail with details of what you have and what you want to do
I'll have a look at it and try to get you on the right track.

Just remove the REMOVE bits from my email address.

There are a number of excellent PHP books in the market, I can recommend the
PHP developers cookbook published by SAMS (Angus Hughes / Andrei Zmievski)
although not a PHP primer it does give a good easy to follow set of code
examples.

Cheers

Ron


.



Relevant Pages

  • saving a file received by a form
    ... I am just another newbie programmer in PHP and web developping and in ... the three days I have been messing up with it I have been able to do ...
    (comp.lang.php)
  • Re: saving a file received by a form
    ... In article, Jorge wrote: ... > I am just another newbie programmer in PHP and web developping and in ... the PHP manual: ...
    (comp.lang.php)
  • Re: [PHP] Preventing SQL Injection/ Cross Site Scripting
    ... It's a shame that so many PHP installations have them enabled, and a huge disappointment that PHP is actually distributed with this stuff enabled! ... encoding data for output to an HTML document. ... characters into 5, 6, or 7-byte strings, if you already provided the correct character set in the Content-Type HTTP header. ... For anything that gets written to a database or used for a query, I suggest escaping the data using a function specifically designed for that database. ...
    (php.general)
  • Re: [PHP] Preventing SQL Injection/ Cross Site Scripting
    ... It's a shame that so many PHP ... encoding data for output to an HTML document. ... characters into 5, 6, or 7-byte strings, if you already provided the ... anything that gets written to a database or used for a query, ...
    (php.general)
  • Re: refactor + help
    ... I'm was messing around with PHP today and I wrote a tiny app that asks ... If your zipcode is less than 5 characters, ... it asks you too enter a zip code with the proper amount of characters. ... the page is sent to the client. ...
    (comp.lang.php)