03/06/2005, 06:58
|
| | | Fecha de Ingreso: febrero-2004 Ubicación: Santiago
Mensajes: 578
Antigüedad: 20 años, 2 meses Puntos: 0 | |
segunda parte
register_send.php Código PHP:
<html> <head> <title>REGISTER</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="estilo.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#FFFFFF" BGPROPERTIES="fixed" leftmargin="0" topmargin="0" marginwidth="00" marginheight="0"> <center><img src="imagenes/tiulo(1).gif"></center><br> <table width="318" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="318"> <?php if ((isset($HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "form")) { //datos del usuario $sender_nombre = ($HTTP_POST_VARS['first_name']); $sender_apellido = ($HTTP_POST_VARS['last_name']); $sender_direccion = ($HTTP_POST_VARS['address']); $sender_ciudad = ($HTTP_POST_VARS['city']); $sender_estado = ($HTTP_POST_VARS['state']); $sender_pais = ($HTTP_POST_VARS['country']); $sender_zip = ($HTTP_POST_VARS['zip_code']); $sender_code = ($HTTP_POST_VARS['code']); $sender_fono1 = ($HTTP_POST_VARS['phone']); $sender_fono2 = ($HTTP_POST_VARS['fax']); $sender_email = ($HTTP_POST_VARS['e_mail']); $sender_username = ($HTTP_POST_VARS['nick']); $sender_pasword = ($HTTP_POST_VARS['password']); $sender_cpasword = ($HTTP_POST_VARS['cpassword']); //valido password if ($sender_pasword != $sender_cpasword) { print ' <br> <div align="center" class="Texto"><b> <br><br><br><br><br>Your Password is Wrong<br><br> <input type="button" class=t_n" name="Button" value="GO BACK PLEASE" onClick="javascript:window.history.back()"> </b><br></div> <br><br>'; die(); } $queryPasswdPart = md5($sender_pasword); $hostname = "localhost"; $database = "tudatabse"; $username = "root"; $password = ""; $coneccion = mysql_pconnect($hostname, $username, $password) or die(mysql_error()); //valido usuario mysql_select_db($database, $coneccion); $query1 = "SELECT * FROM members where UserName = '" . $sender_username . "'"; $consulta = mysql_query($query1, $coneccion) or die(mysql_error()); $row = mysql_fetch_assoc($consulta); $totalRows = mysql_num_rows($consulta); if ($totalRows > 0) { print ' <br> <div align="center" class="Texto"><b> <br><br><br><br><br>This UserName Already exist!.<br><br> <input class="t_n" type="button" name="Button" value="GO BACK PLEASE" onClick="javascript:window.history.back()"> </b><br></div> <br><br>'; die(); } //valido email mysql_select_db($database, $coneccion); $query1 = "SELECT * FROM members where Email = '" . $sender_email . "'"; $consulta = mysql_query($query1, $coneccion) or die(mysql_error()); $row = mysql_fetch_assoc($consulta); $totalRows = mysql_num_rows($consulta); if ($totalRows > 0) { print ' <br> <div align="center" class="Texto"><b> <br><br><br><br><br>This Email Already exist.!<br><br> <input type="button" name="Button" value="GO BACK PLEASE" onClick="javascript:window.history.back()"> </b><br></div> <br><br>'; die(); } //$telefono_completo='('.$_POST['$sender_code'].') '.$_POST['$sender_fono1']; $insertSQL = sprintf("INSERT INTO members (Name, LastName, Address, City, pais, State, Zip, area_code, Phone, Fax, Email, Username, Password) VALUES ( '" . $sender_nombre . "', '" . $sender_apellido . "', '" . $sender_direccion . "', '" . $sender_ciudad . "', '" . $sender_pais . "', '" . $sender_estado . "', '" . $sender_zip . "', '" . $sender_code . "', '" . $sender_fono1 . "', '" . $sender_fono2 . "', '" . $sender_email . "', '" . $sender_username . "', '" . $queryPasswdPart . "')"); mysql_select_db($database, $coneccion); $Result1 = mysql_query($insertSQL) or die('ERROR, please contact: <a href="mailto:[email protected]">[email protected]</a>'); //datos de la empresa $recipient = $sender_email; $subject = "Welcome to SpeakingSoft.com"; $mailheaders = "From: [email protected] \n"; $mailheaders .= "Reply-To: [email protected] \n"; $mailheaders .= "Content-type: text/html; charset=iso-8859-1\n\n"; $Adate = date("F d, Y",time()); //correo $msg = " <html> <head> <link href=\"http://www.tupagina.com/estilo.css\" rel=\"stylesheet\" type=\"text/css\"> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> </head> <body bgcolor=\"#FFFFFF\" text=\"#333333\"> <div align=\"center\"> <TABLE width=776 border=0 align=\"center\" cellPadding=0 cellSpacing=0 bgcolor=\"#FFFFFF\"> <TR> <TD width=1></TD> <TD valign=\"top\"> <div align=\"center\"> <table width=724 border=0 align=\"center\" cellpadding=0 cellspacing=0> <tr valign=\"top\"> <td height=\"96\" colspan=2> <div align=\"center\"><img src=\"http://www.tupagina.com/imagenes/imagen.gif\"> </div></td> </tr> <tr> <td colspan=\"2\" valign=\"top\"> <div align=\"center\"> <table width=\"100%\" height=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#336699\"> <tr bgcolor=\"#FFFFFF\"> <td height=\"18\" colspan=\"2\" align=\"center\" valign=\"middle\"> <div align=\"center\"><font color=\"336699\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif Arial, Helvetica, sans-serif\"> $Adate </font></div></td> </tr> <tr> <td width=\"601\" height=\"2\"></td> <td width=\"148\"></td> </tr> </table> <br> <table width=100% border=0 align=\"left\" background=\"http://www.tupagina.com/imagenes/imagen.gif\" cellpadding=0 cellspacing=0> <tr valign=\"top\"> <td height=18 colspan=3></td> </tr> <tr> <td width=\"100%\" valign=top> <div align=\"left\"> <font color=\"336699\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif Arial, Helvetica, sans-serif\"> WELCOME Mr. " . $sender_apellido . " to SpeakingSoft.com <br><br> Dear " . $sender_nombre . ": <br><br> Welcome to SpeakingSoft.com, provider for Customized Business Software Solutions. <br> We are happy to have you as a member of our site. Your email address and profile have been recorded in our database. <br><br> Here is your member Access Information:</font><br><br> <font color=\"336699\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif Arial, Helvetica, sans-serif\"><strong> Username: " . $sender_username . "<br> Password: " . $sender_pasword . "<br><br> </strong></font> <font color=\"336699\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif Arial, Helvetica, sans-serif\"> We will keep your information in absolute privacy. <br><br> Thank you for registering, if you have any questions or comments, feel free to contact us: <a href=\"mailto:[email protected]\">[email protected]</a> <br><br> Now your can find more information in our site: <a href=\"http://www.tupagina.com\">http://www.tupagina.com</a> </font></div></td> </tr> <tr> <td colspan=3 height=18></td> </tr> </table> </div> </td> </tr> <tr> <td width=\"100%\" height=\"1\" bgcolor=\"#336699\"></td> <td width=\"791\"></td> </tr> </table> <br> <font size=\"-3\" face=\"Verdana, Arial, Helvetica, sans-serif\"><br> Nataniel Cox N° 210 of. 55 & 65, Santiago, Chile. Phone: (56-2) 688-9158, (56-2) 697-3056<br> Fax: (56-2) 688-5621. e-mail:<a href=\"mailto:[email protected]\">[email protected]</a></font></div></TD> </TR> </TABLE> </div> </body> </html>"; mail($recipient, $subject, $msg, $mailheaders) and print '<br> <div align="center" class="Texto"> <font color="#336699" size="1" face="Verdana, Arial, Helvetica, sans-serif">WELCOME ' . $first_name . ' to SpeakingSoft.com <br> You will receive an e-mail containing your register data <br>can enjoy to privileged information</font> </b><br> <br><br><input type="button" name="Button" class="t_n" value="Close" onClick="self.close();return false"></div>'; } ?> </td> </tr> </table> </body> </html>
saludos
__________________ ..:: NADA SE PIERDE SOLO SE TRANSFORMA ::.. |