Small PHP fix needed - Right NOW
$30-250 USD
Teslim sırasında ödenir
Looking to pay under $15 - bid fast and cheap please. I have a simple PHP issue where my web form is supposed to send the submission to a new email with each new submission and then loop back to the first email in the code. Everything works fine except once the counter gets to case 10 it stops working. If you can fix this right now let me know. Here is part of the code below. It uses a counter [login to view URL] file which is = 1. Thank you.
//...... If they specify "email" in their form, it will set the reply-to field.
$counter_file = "counter_check.txt";
$file = fopen($counter_file, "r");
$count = fread($file, 1);
fclose($file);
switch($count)
{
case '0':
$mailto = "EMAIL1";
$newCount = "1";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '1':
$mailto = "EMAIL2";
$newCount = "2";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '2':
$mailto = "EMAIL3";
$newCount = "3";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '3':
$mailto = "EMAIL4";
$newCount = "4";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '4':
$mailto = "EMAIL5";
$newCount = "5";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '5':
$mailto = "EMAIL6";
$newCount = "6";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '6':
$mailto = "EMAIL7";
$newCount = "7";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '7':
$mailto = "EMAIL8";
$newCount = "8";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '8':
$mailto = "EMAIL9";
$newCount = "9";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '9':
$mailto = "EMAIL10";
$newCount = "10";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '10':
$mailto = "EMAIL11";
$newCount = "11";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '11':
$mailto = "EMAIL12";
$newCount = "12";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
case '12':
$mailto = "EMAIL13";
$newCount = "0";
$file = fopen($counter_file, "w");
fwrite($file, $newCount);
fclose($file);
break;
}
if($email)
{
$sentMail = mail($mailto,$subject,$newMsg,"Reply-To: $email\r\nFrom: $email\r\n$headers");
//...... MAIL TO USER
if($emailusr)
{
mail($email,$subject,$newMsg,"Reply-To: $mailto\r\nFrom: $mailto\r\n$headers");
}
Proje NO: #380024
Proje hakkında
Seçilen:
Bu iş için 27 freelancer ortalamada $37 teklif veriyor
Hi, I see the issue in the script. can fix it right now. $10 will be enough, PMB is not needed as this is a very simple project. If you select me, send me the scrit then I send the fixed script to you. Let's make it wo Daha Fazla
I saw the error. Easy to fix. PMB. also this code can be improved and reduced in size less than 10 lines, but to support easier way to work with unlimited emails you just enter and all auto work. Details at PMb, price Daha Fazla