The bottom of your process.php file has the "crude" html page code. Either modify this code to your satisfaction or take it out and use the php refresh function to display any page you want.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could you please send me the right script to achieve this. I don't know anything about php scripting. I'd appreciate it!
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Nombres');
pt_register('POST','Apellidos');
pt_register('POST','Email');
pt_register('POST','Consulta');
$Consulta=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Consulta);if($Nombres=="" || $Email=="" || $Consulta=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Nombres: ".$Nombres."
Apellidos: ".$Apellidos."
Email: ".$Email."
Consulta: ".$Consulta."
";
$message = stripslashes($message);
mail("dark_go@hotmail.com","www.lapiramidemoche.com",$message,"From: visitante");
If I forget to fill out a field, I get a crude page with a short message. How can i make it open an error.html page
Thanks!
The bottom of your process.php file has the "crude" html page code. Either modify this code to your satisfaction or take it out and use the php refresh function to display any page you want.
Could you please send me the right script to achieve this. I don't know anything about php scripting. I'd appreciate it!
<?php
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','Nombres');
pt_register('POST','Apellidos');
pt_register('POST','Email');
pt_register('POST','Consulta');
$Consulta=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $Consulta);if($Nombres=="" || $Email=="" || $Consulta=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="<li>Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Nombres: ".$Nombres."
Apellidos: ".$Apellidos."
Email: ".$Email."
Consulta: ".$Consulta."
";
$message = stripslashes($message);
mail("dark_go@hotmail.com","www.lapiramidemoche.com",$message,"From: visitante");
header("Refresh: 0;url=http://www.azulejosweb.com/templo/sent.html");
?><?php
}
?>
if($errors==1)
header("Refresh: 0;url=http://www.azulejosweb.com/templo/errorpage.html");
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Nombres: ".$Nombres."
Apellidos: ".$Apellidos."
Email: ".$Email."
Consulta: ".$Consulta."
";
$message = stripslashes($message);
mail("dark_go@hotmail.com","www.lapiramidemoche.com",$message,"From: visitante");
header("Refresh: 0;url=http://www.azulejosweb.com/templo/sent.html");
?><?php
}
?>
Thank you so much. I works fine now