Foros del Web » Creando para Internet » HTML »

Confirmacion de Registro/Publicidad

Estas en el tema de Confirmacion de Registro/Publicidad en el foro de HTML en Foros del Web. Buenas, he creado este post porque sinceramente llevo varios días buscando y no encuentro anda, a si que os cuento mi problema. He creado una ...
  #1 (permalink)  
Antiguo 28/01/2015, 13:37
 
Fecha de Ingreso: enero-2015
Mensajes: 5
Antigüedad: 9 años, 2 meses
Puntos: 0
Exclamación Confirmacion de Registro/Publicidad

Buenas, he creado este post porque sinceramente llevo varios días buscando y no encuentro anda, a si que os cuento mi problema.

He creado una pagina web y ahora acabo de introducir registros de usuarios, bien hasta ahí tengo todo correcto, el problema es que quiero que al registrarse un usuario le llegue una especie de correo de confirmación de registro pero en el le llegara una especie de oferta por suscribirse, en plan una imagen para que ellos impriman. Bien la duda es como creo el código que haga que al registrarse un usuario se le envie ese correo y la otra duda es, como enlace el contenido del correo a eso.

Por cierto todo esta hecho con dreamweaver
  #2 (permalink)  
Antiguo 28/01/2015, 13:45
 
Fecha de Ingreso: octubre-2014
Ubicación: Buenos Aires
Mensajes: 278
Antigüedad: 9 años, 6 meses
Puntos: 12
Respuesta: Confirmacion de Registro/Publicidad

Hola AXION5000, bienvenido al foro, uses dreamweaver da lo mismo ya que es una herramienta, podría estar hecho en bloc de notas y seria igual.

Por otra parte, ya tienes el código de registro de usuario, de ser así pega el código (utiliza el combo de highligth para resaltar el código) que tienes hasta ahora para que podamos ayudarte.

Saludos.
__________________
http://www.sp-vision.net
  #3 (permalink)  
Antiguo 29/01/2015, 01:34
 
Fecha de Ingreso: enero-2015
Mensajes: 5
Antigüedad: 9 años, 2 meses
Puntos: 0
Respuesta: Confirmacion de Registro/Publicidad

<?php require_once('Connections/Usuario.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO web (ID, Nombre, Apellidos, Poblacion, Pasword, Direccion, Provincia, Email, Telefono, Fijo, `Tienes ADSL(SI/NO)`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['ID'], "int"),
GetSQLValueString($_POST['Nombre'], "text"),
GetSQLValueString($_POST['Apellidos'], "text"),
GetSQLValueString($_POST['Poblacion'], "text"),
GetSQLValueString($_POST['Pasword'], "text"),
GetSQLValueString($_POST['Direccion'], "text"),
GetSQLValueString($_POST['Provincia'], "text"),
GetSQLValueString($_POST['Email'], "text"),
GetSQLValueString($_POST['Telefono'], "text"),
GetSQLValueString($_POST['Fijo'], "text"),
GetSQLValueString($_POST['ADSL'], "text"));

mysql_select_db($database_Usuario, $Usuario);
$Result1 = mysql_query($insertSQL, $Usuario) or die(mysql_error());

$insertGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/plantillabase.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin título</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="css/estiloprincipal.css" rel="stylesheet" type="text/css" />

<link href="css/menu_assets/styles.css" rel="stylesheet" type="text/css">




<link href='http://fonts.googleapis.com/css?family=Dosis:300,400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>



<?php include("includes/google.php"); ?>



<style type="text/css">
body,td,th {
font-family: Dosis, sans-serif;
}
</style>
</head>

<body bgcolor="#FFFFFF">

<div class="container">
<div class="header"><!-- InstanceBeginEditable name="Parte superior" -->
<div class="clearfloat"></div>
<?php include("includes/cabecera.php"); ?>
<?php include("includes/menu.php"); ?>

<!-- InstanceEndEditable --></div>


<!-- InstanceBeginEditable name="Informacionizq" -->

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/es_ES/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="sidebar1">
<form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="362" border="0" align="center" class="otra">
<tr>
<td width="166">ID</td>
<td width="186"><label for="ID"></label>
<input type="text" name="ID" id="ID" /></td>
</tr>
<tr>
<td>Nombre</td>
<td><label for="Nombre"></label>
<input type="text" name="Nombre" id="Nombre" /></td>
</tr>
<tr>
<td>Apellidos</td>
<td><label for="Apellidos"></label>
<input type="text" name="Apellidos" id="Apellidos" /></td>
</tr>
<tr>
<td>Poblacion</td>
<td><label for="Poblacion"></label>
<input type="text" name="Poblacion" id="Poblacion" /></td>
</tr>
<tr>
<td> Pasword</td>
<td><label for="Pasword"></label>
<input type="text" name="Pasword" id="Pasword" /></td>
</tr>
<tr>
<td>Direccion</td>
<td><label for="Direccion"></label>
<input type="text" name="Direccion" id="Direccion" /></td>
</tr>
<tr>
<td>Provincia</td>
<td><label for="Provincia"></label>
<input type="text" name="Provincia" id="Provincia" /></td>
</tr>
<tr>
<td>Email</td>
<td><label for="Email"></label>
<input type="text" name="Email" id="Email" /></td>
</tr>
<tr>
<td>Telefono</td>
<td><label for="Telefono"></label>
<input type="text" name="Telefono" id="Telefono" /></td>
</tr>
<tr>
<td>Fijo</td>
<td><label for="Fijo"></label>
<input type="text" name="Fijo" id="Fijo" /></td>
</tr>
<tr>
<td>Tienes ADSl(SI/NO)</td>
<td><label for="ADSL"></label>
<input type="text" name="ADSL" id="ADSL" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Enviar" id="Enviar" value="Enviar" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
</div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="ParteDerecha" -->
<div class="content">
<p>Registrate y podras disfrutar de ofertas exclusivas</p>
<h1 class="centro">&nbsp;</h1>
<!-- end .content -->
</div>
<!-- InstanceEndEditable -->
<div class="footer">
<?php include("includes/pie.php"); ?></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>
  #4 (permalink)  
Antiguo 29/01/2015, 01:35
 
Fecha de Ingreso: enero-2015
Mensajes: 5
Antigüedad: 9 años, 2 meses
Puntos: 0
Respuesta: Confirmacion de Registro/Publicidad

Esto seria todo el codigo de la pagina correspondiente al registro
  #5 (permalink)  
Antiguo 29/01/2015, 05:33
 
Fecha de Ingreso: octubre-2014
Ubicación: Buenos Aires
Mensajes: 278
Antigüedad: 9 años, 6 meses
Puntos: 12
Respuesta: Confirmacion de Registro/Publicidad

Bueno, lo primero que haría es agregar a tu tabla de usuarios 2 campos adicionales.

1_ Campo Codigo --> Acá generaríamos un código único para validar el link

2_ Campo Habilitado default 0 --> Acá una vez que se haga click en el link enviado por mail, se valida el código generado, de existir el código realizamos update en el campo habilitado en 1.

Antes de hacer la inserción puedes agregar esto.
Código PHP:
Ver original
  1. $length = 15; // Cantidad de dígitos que tendrá tu código para validar
  2.  
  3. $pattern = "1234567890abcdefghijklmnopqrstuvwxyz";
  4.     for($i=0;$i<$length;$i++) {
  5.       $key .= $pattern{rand(0, 35)};
  6.     }

y en el campo Codigo insertas la variable $key

Una vez insertado el usuario envías el mail con el link que tenga el Id del usuario + otro parámetro con el código que generamos.

Espero se entienda.

Saludos.
__________________
http://www.sp-vision.net
  #6 (permalink)  
Antiguo 03/02/2015, 12:49
 
Fecha de Ingreso: enero-2015
Mensajes: 5
Antigüedad: 9 años, 2 meses
Puntos: 0
Respuesta: Confirmacion de Registro/Publicidad

Muchas gracias, voy a probarlo a ver que tal
  #7 (permalink)  
Antiguo 03/02/2015, 12:53
 
Fecha de Ingreso: enero-2015
Mensajes: 5
Antigüedad: 9 años, 2 meses
Puntos: 0
Respuesta: Confirmacion de Registro/Publicidad

Sinceramente no se como hacer lo que me dices xd, y otra cosa si ahora eso funcionase como le digo el correo que tiene que enviar, es decir, el contenido.

Etiquetas: confirmacion, correos, creación, dreamweaver, email, php, publicidad, registro, usuarios
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:21.