I would like to send an email using the php email() function then if it does execute i.e sends i would like to update a particular field in my db.however no matter how hard i try to the code seem to defy simply logic.here is the original code i have Code:
include_once("mailer.php");
$thesend=mail($toto1,$subject1,$message,$headers);
if($thesend)
{
$mail_went=1;
$_SESSION['msgstatus']= "Mail sent to ".$toto1."
";
}else{
$mail_went=0;
$_SESSION['msgstatus']= "Mail send failure - message not sent
";
}
the funny part is that the code executes the else and actually gives me the Mail send failure message yet i do receive the mail in my box????
However if i do change this to be like this Code: include_once("mailer.php");
$thesend=mail($toto1,$subject1,$message,$headers);
if(!$thesend)
{
$mail_went=1;
$_SESSION['msgstatus']= "Mail sent to ".$toto1."
";
}else{
$mail_went=0;
$_SESSION['msgstatus']= "Mail send failure - message not sent
";
}
........all works perfect what am i missing.The $message is an HTMl doc and the MIME and content-type are ok.
Damn
Is there a more efficient way to code this than what I have?
I have three associative arrays. $combinedSettings$userSettings$defaultSettingsMy function must combine the key and value from $userSettings and $defaultSettings into the $combinedSettings array.
paginate search result
Hi, I have a paginations script to display data from my database but i would like to paginate someones search results. I have this script but get an error that says "syntax error, unexpected '=',
PHP Directory Listing Not working
Hey Guys,I need help, I tried a ton of directory listing scripts and they all don't work. Althogh the normal Apache Directory Indexing does work when you visit. The URL is
puting for loop in 1 value
hi ,how do i put this code in 1 value:Code: <?phpfor ($i=1; $i<=5; $i++) { echo $i ; }?>the output will be: 12345how do i put the result in one value ,some thing like :if the
Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have done.Basically what I am trying to do is on our intranet, display a different home page banner
Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting. How would I connect to the database on my hosting account? Currently I am using the following but
download directory onto C drive
I am attempting (if this is possible) to write a routine to automatically dump the contents of a directory on the server into a directory on the local C drive.I started out like this :Code:
News script
Hi ...I am not sure if this is the rite place to post this but if its not sorry i am new here and need help with my cricket scores script now the code works well i just cant get the next or prev to
private constructor
Hello,Can we create a constructor as private? If yes, what is the use of it? If no, why can't we make it?Please suggest...Thanks
Warning: mysql_num_rows() supplied argument is not a valid MySQL result resource
This may be simple I just may need another pair of eyes..When i get records back the below code works just fine, when I get 0 rows back it shows the warning below. As you can see I tried to code for