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"> </h1>
<!-- end .content -->
</div>
<!-- InstanceEndEditable -->
<div class="footer">
<?php include("includes/pie.php"); ?></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html> |