Hola foro!
Mando un cordial saludo a todos, soy nuevo en esto del
PHP y quiero hacer un tipo de
Mailing list en mi web hospedado en
Yahoo!, asi es que consegui este Form de ahi (
Yahoo!), pero quisiera cambiar la fuente, tamaño y color del texo asi como el "background" o fondo de la pagina.
Espero puedan ayudarme, dejo codigo:
Código PHP:
<?php
# ATTENTION! - IF YOU COPY THIS CODE, CHANGE THE NEXT LINE!
$to = "[email protected]";
$ask = 0;
if (($Name == "") && ($Email == "") && ($Comments == ""))
{
$ask = 1;
echo "<p class=\"bodymd\">Please fill out the form and then click on the submit button.</p>";
}
elseif (($Name == "") || ($Comments == ""))
{
$ask = 1;
echo "<p class=\"bodymd\">You missed some field.</p>";
}
if ($ask == 1)
{
echo "<p class=\"bodymd\">Please fill in all the fields, so we can get back to you...</p>";
echo "<form name=\"form\" method=\"post\" action=\"response.php\">";
echo "<p class=\"bodymd\">Your Name (required)<br><input type=\"text\" name=\"Name\" value=\"$Name\"></p>";
echo "<p class=\"bodymd\">Your Email (optional)<br><input type=\"text\" name=\"Email\" value=\"$Email\"></p>";
echo "<p class=\"bodymd\">Comments or Questions (required)<br><textarea name=\"Comments\" rows=\"5\" cols=\"50\">$Comments</textarea></p>";
echo "<input type=\"submit\" name=\"Submit\" value=\"Submit\">";
echo "<input type=\"reset\" name=\"Reset\" value=\"Clear Form\">";
echo "</form>";
}
else
{
$message = "Name: $Name\nEmail: $Email\nComments: $Comments\n";
$eLog="/tmp/mailError.log";
//Get the size of the error log
//ensure it exists, create it if it doesn't
$fh= fopen($eLog, "a+");
fclose($fh);
$originalsize = filesize($eLog);
if (preg_match('/^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]{2,4}$/', $Email, $matches)) {
print ("Sending to owner (cc: to you) --</ br></ br>");
mail ($to, "Website Email", $message, "Cc:$Email");
} else {
print ("Sending to owner --</ br></ br>");
mail ($to, "Website Email", $message);
}
/*
* NOTE: PHP caches file status so we need to clear
* that cache so we can get the current file size
*/
clearstatcache();
$finalsize = filesize($eLog);
//Check if the error log was just updated
if ($originalsize != $finalsize) {
print "<p>There was a problem sending the mail. Please try again later or send the message to<a href=\"$to\">$to</a> using your own mail client progam.</p>";
} else {
echo "<p class=bodymd>Thanks for your message, $Name.</p>";
}
}
?>
Ahh tambien me gustaria que despues de enviar los datos, re-direccione al usuario a otra pagina, algo asi:
http://www.myreg.net/checkform?force_form=1&form_id=12655
Espero no sea mucho pedir,
Saludos
FERNANDO