Jump to content

Recommended Posts

The line the Error is :

 

$result = mail("" . $formatted_number. "", "" . $subject . "", "". $message ."");

 

In the code:

if (array_key_exists($carrier, $carriers))
{

$correctCarrier = $carriers[$carrier];


$i = 0;
while($i < $_POST['amount']){
$i++;

$formatted_number = $to.$correctCarrier
$result = mail("" . $formatted_number. "", "" . $subject . "", "". $message ."");
$resultmsg = "Your Message Has been sent to the number ". $formatted_number. ".<br>";
}
Echo $result;
Echo $resultmsg;
Echo "You have Sent $_POST['amount'] Messages to the number $_POST['to'].";
}

Mod-Jay,

  The problem is that line before is missing the ';' at the end.

 

However, I have to ask why are you concatenating a bunch of empty strings there?  There is no reason for that, just pass your parameters in there... php does typcasting on the fly.

Well he didnt say what line and i didnt bother to look at the others, Thanks!

You said the line causing the error was:

$result = mail("" . $formatted_number. "", "" . $subject . "", "". $message ."");

and Gizmola said:

The problem is that line before is missing the ';' at the end.

which is the line that I just posted. :P

 

Anyway, glad it's working.

 

Maq deserves the php "e-knight" badge for defending my honor.  Thanks amigo  ;)

 

But back to the important part of my reply, which is -- please for all that is good and right in the world of php development, lose all the null strings!!!!!!!!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.