RE: [Linux-programlama] PHP mail sorusu

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Agah ALICI (agah@sakarya.edu.tr)
Date: Tue 07 Nov 2006 - 14:01:20 GMT


Bişey daha ekleyecektim unutmuşum kusura bakmayın.
if($row['manufacturerID'] =='7' || $row['manufacturerID'] =='3'
> || $row['manufacturerID'] =='4'
> || $row['manufacturerID'] =='5'|| $row['manufacturerID'] =='6'
> || $row['manufacturerID'] =='49'
> || $row['manufacturerID'] =='57'|| $row['manufacturerID']
> =='59'|| $row['manufacturerID'] =='64'
> || $row['manufacturerID'] =='73'

Yerine
if(in_array($row['manufacturerID'], array('7','3','4','5','6','49','57',
'59', '73') )
{

}

Şeklinde bir karşılaştırma kullansanız sizin için yazımı daha kolay olur...
 

-----Original Message-----
From: linux-programlama-bounces@liste.linux.org.tr
[mailto:linux-programlama-bounces@liste.linux.org.tr] On Behalf Of Agah
ALICI
Sent: Tuesday, November 07, 2006 3:58 PM
To: linux-programlama@liste.linux.org.tr
Subject: RE: [Linux-programlama] PHP mail sorusu

Merhabalar

Şöyle bir metod deneyebilirsiniz.

$Adresler = array();
$Adresler[1] = array('a@a.com');
$Adresler[2] = array('a@a.com', 'b@b.com'); $Adresler[3] = array('c@c.com');
while($row=mysql_fetch_array($result)) {
        $to = implode(";", $Adresler[$result['ID']]); // yada
        /*
        * foreach($Adresler[$result['ID']] as $value) {
        * $to = $value;.... Buraya mail komutlarının devamı
        * }
        */
}
Şeklinde kullanabilirsiniz.

Olayı tam kavrayamadım ama böyle bir şey işinize yarar sanıyorum.

Kolay Gelsin...

-----Original Message-----
From: linux-programlama-bounces@liste.linux.org.tr
[mailto:linux-programlama-bounces@liste.linux.org.tr] On Behalf Of Guray
SATICI
Sent: Tuesday, November 07, 2006 3:50 PM
To: linux-programlama@liste.linux.org.tr
Subject: Re: [Linux-programlama] PHP mail sorusu

explode komutu cok faydali bir komuttur.
Kullanim seklini inceleyin ve ornek kodlara bakin.
Ordan bu sorununuzu cok rahat bir sekilde halledeceksiniz.

On 11/7/06, Erdal YAZICIOGLU <erdal.yazicioglu@gmail.com> wrote:
> Merhabalar,
> MySQL veritabanından çektiğim tabloda ID kısmında 1 yazıyor ise a
> kulanıcısına 1,2 yazıyor ise hem a hem b kullanıcısına, 3 yazıyor ise
> c kullanıcısına mail attırmak istiyorum... Nasıl yapabilirm...Şöyle
> bir döngü yazdım ama olmadı :(
>
> Yardımlarınız için teşekkürler
>
> while($row=mysql_fetch_array($result)) {
> if($row['manufacturerID'] =='7' || $row['manufacturerID'] =='3'
> || $row['manufacturerID'] =='4'
> || $row['manufacturerID'] =='5'|| $row['manufacturerID'] =='6'
> || $row['manufacturerID'] =='49'
> || $row['manufacturerID'] =='57'|| $row['manufacturerID']
> =='59'|| $row['manufacturerID'] =='64'
> || $row['manufacturerID'] =='73') {
> $to ='la@a.com';
> $message .="<tr><td>". $row['incidentDescription'] .
> "</td><td>". $row['incidentStatus'] . "</td><td>";
> $message .= $row['hospitalName'] . "</td><td>".
> $row['instrumentTypeName'] . "</td><td>";
> $message .= $row['manufacturerName'] . "</td></tr>";
> $message .= "<tr bgcolor=dbf1f9><td colspan=5></td></tr>";
> }
> elseif($row['manufacturerID'] =='5' || $row['manufacturerID']
> =='6' || $row['manufacturerID'] =='7'
> || $row['manufacturerID'] =='22') {
> $to ='b@b.com';
> $message .="<tr><td>". $row['incidentDescription'] .
> "</td><td>". $row['incidentStatus'] . "</td><td>";
> $message .= $row['hospitalName'] . "</td><td>".
> $row['instrumentTypeName'] . "</td><td>";
> $message .= $row['manufacturerName'] . "</td></tr>";
> $message .= "<tr bgcolor=dbf1f9><td colspan=5></td></tr>";
>
> }else
> {
> }
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>

--
______________________________________________
Guray SATICI (Electronic [NG]near)
Sys.Adm. & Web Dev.
[Audi::Anytime Of Life] [q7 :: http://www.audi.com/q7-globe ]

_________________________________________________________

Bu E-Posta Sakarya Universitesi E-posta Sunucusu Araciligiyla Size Ulastirilmistir.

SAU >> BIDB >> Ar-Ge S.M. >> Sistem Yonetimi Servisi

>> BitDefender Antivirus Yazilimi Tarafindan Virus Taramasindan Gecirilmistir.

_______________________________________________ Linux-programlama mailing list Linux-programlama@liste.linux.org.tr http://liste.linux.org.tr/mailman/listinfo/linux-programlama

_________________________________________________________

Bu E-Posta Sakarya Universitesi E-posta Sunucusu Araciligiyla Size Ulastirilmistir.

SAU >> BIDB >> Ar-Ge S.M. >> Sistem Yonetimi Servisi

>> BitDefender Antivirus Yazilimi Tarafindan Virus Taramasindan Gecirilmistir.

_______________________________________________ Linux-programlama mailing list Linux-programlama@liste.linux.org.tr http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.