As a new child in PHP, I was trying to write a code which sends an email to a recipient whenever a client order a copies of program. this is what I did:
<?php
include ('config.db.inc .php');
include ('cleanit.php') ;
if (isset($_GET['button']))
{
$To = "mashudu@cosmic link.co.za";
$subject = "Order Copies";
$message = "Name : " . clean_it($_GET['requiredtxtnam e']);
$message .= "\nTelephon e : " . clean_it($_GET['requiredtxttel ']);
$message .= "\nAddress : " . clean_it($_GET['requiredtxtadd ress']);
$message .= "\n\nProgra m Name : " . clean_it($_GET['requiredtxtpgm name']);
$message .= "\nTime of Program : " . clean_it($_GET['requiredtxtpgm time']);
$message .= "\nDate of Program : " . clean_it($_GET['requireddtepgm date']);
$message .= "\n\nTopic : " . clean_it($_GET['requiredtxttop ic']);
if (isset($_GET['txtother']))
{
$message .= "\n\nOther Information : " . clean_it($_GET['txtother']);
}
$from = clean_it($_GET['requiredtxtnam e']);
$sendmail = mail($To,$subje ct,$message,$fr om);
if (!$sendmail)
{
mail('mashudu@c osmiclink.co.za ','Cii Order Copies Error','There was an error in sending the email to sumaya@ciinetwo rk.net');
}
}
?>
And this is the error I received.
Warning: Failed to Receive in c:\phpdev\www\c ii\broadcasting \html\submitord er.php on line 25
Fatal error: Maximum execution time of 30 seconds exceeded in c:\phpdev\www\c ii\broadcasting \html\submitord er.php on line 25
I'm running this from a localhost. Anyone with a solution, please help me to get this write.
<?php
include ('config.db.inc .php');
include ('cleanit.php') ;
if (isset($_GET['button']))
{
$To = "mashudu@cosmic link.co.za";
$subject = "Order Copies";
$message = "Name : " . clean_it($_GET['requiredtxtnam e']);
$message .= "\nTelephon e : " . clean_it($_GET['requiredtxttel ']);
$message .= "\nAddress : " . clean_it($_GET['requiredtxtadd ress']);
$message .= "\n\nProgra m Name : " . clean_it($_GET['requiredtxtpgm name']);
$message .= "\nTime of Program : " . clean_it($_GET['requiredtxtpgm time']);
$message .= "\nDate of Program : " . clean_it($_GET['requireddtepgm date']);
$message .= "\n\nTopic : " . clean_it($_GET['requiredtxttop ic']);
if (isset($_GET['txtother']))
{
$message .= "\n\nOther Information : " . clean_it($_GET['txtother']);
}
$from = clean_it($_GET['requiredtxtnam e']);
$sendmail = mail($To,$subje ct,$message,$fr om);
if (!$sendmail)
{
mail('mashudu@c osmiclink.co.za ','Cii Order Copies Error','There was an error in sending the email to sumaya@ciinetwo rk.net');
}
}
?>
And this is the error I received.
Warning: Failed to Receive in c:\phpdev\www\c ii\broadcasting \html\submitord er.php on line 25
Fatal error: Maximum execution time of 30 seconds exceeded in c:\phpdev\www\c ii\broadcasting \html\submitord er.php on line 25
I'm running this from a localhost. Anyone with a solution, please help me to get this write.
Comment