Ver Mensaje Individual
  #9 (permalink)  
Antiguo 10/02/2007, 12:53
rob7727
 
Fecha de Ingreso: febrero-2007
Mensajes: 8
Antigüedad: 17 años, 2 meses
Puntos: 0
Re: Formulario de posteo

Este es el codigo del noseque.php


<?php
################################################## #############################
# These are te defaults, if they are not defined in the form it will be
# sent to this address with $form as the subject. If they are defiend
# in the form those values override these values
$to = "Correo Electronico Aqui";
$form = "Complacencias";
################################################## #############################
# This affects how the date is displayed, see
# for more info
$today = gmdate ( "M d Y H:i:s" );
################################################## #############################
function print_form($array, $body) {
if(gettype($array)=="array") {
while (list($index, $sub) = each($array)) {
$index = ereg_replace("\*", "", $index);
$index = ereg_replace("_", " ", $index);
$body = $body . $index . ": " . $sub . "\n\n";
}
}else{
$body = $body . $array;
}
return $body;
}
function check_input($array){
global $HTTP_REFERER;
$valid = 1;
if(gettype($array)=="array") {
while (list($index, $subarray) = each($array) ) {
if(ereg("\*", $index) && (($subarray == "") || ($subarray == " "))) {
$index = ereg_replace("\*", " ", $index);
$index = ereg_replace("_", " ", $index);
echo"";
$valid = 0;
return 0;
exit;
}elseif(eregi("email", $index)){
if(ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $subarray)){
$email_check = 1;
}else{
$index = ereg_replace("\*", " ", $index);
echo"";
return 0;
exit;
}
}else{
$email_check = 10;
}
}
if($valid == "1" && ($email_check == "1" || $email_check == "10")) {
return 1;
}else{
return 0;
}
}
}
if ($submit) {
reset($HTTP_POST_VARS);
if(check_input($HTTP_POST_VARS)) {
$info =" $today, Un visitante envio el siguiente formulario '$form'.\n\n";
if($REMOTE_HOST == " " || $REMOTE_HOST == "") {
$host = "IP only";
}else{
$host = "$REMOTE_HOST";
}
$body = print_form($HTTP_POST_VARS, $info) . "\n\nEl usuario que envio fue: $REMOTE_ADDR ($host using $HTTP_USER_AGENT)";
mail($to, $form, $body);
echo"<script languaje='JavaScript'>location.href='thanks.html'; </script>";
}else{
echo"<p><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>¡ERROR!</font></p>";
}
}else{
?>
<h3>Forms</h3>
<p>This is the MatizeForm processor.</p>
<?php
}
echo"<!-- Matize.com -->";
?

no se en q parte agregar el codigo q me diste



Rob