Código HTML:
Ver original<form onSubmit="Enviar(); return false" method="post"> <Cuadro>
<izquierda>
<? include("Select.php"); ?>
<input type="text" id="Titulo" placeholder="Ingresa el nombre del disco" /><br> <input type="url" id="Imagen" placeholder="Ingresa la url de la caratula"/><br> <input type="number" id="Ano" placeholder="Año" /><br> <input type="number" id="Velocidad" placeholder="Velocidad" /><br> <input type="text" id="Servidor" placeholder="Ej:Megaupload,rapidshare..."/><br> <input type="text" id="Sello" placeholder="El sello discografico" /><br> <input type="url" id="Descarga" placeholder="El link de descarga"/>
</izquierda>
<derecha id="Derecha">
Sitio solo para administradores y ayudantes.
<br /> <hr align="left" width="600" style="border:1px solid #666; opacity:0.6;"/> Desde aqui usted podra añadir nuevas placas a los interpretes
<br /> que ya esten en Suelas Embarradas.
<hr align="left" width="600" style="border:1px solid #666; opacity:0.6;"/> Por favor Complete el formulario de la izquierda para poder
<br /> enviar y previsualizar.
<hr align="left" width="600" style="border:1px solid #666; opacity:0.6;"/> Se recomienda NO usar imagenes subidas a redes sociales
<br> tales como : Facebook , ya que tienen Privacidad siendo imposible su uso
<hr align="left" width="600" style="border:1px solid #666; opacity:0.6;"/> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcRgKj1VUnHhWBQYr4lXk9iGp7dHsQGXW_zW1rx3xb8bkIj4_8x9ISZY9gU" width="25" height="25" /> <img src="http://t3.gstatic.com/images?q=tbn:ANd9GcT7MgFFGk-L_KzO19HkEXOP-QUd_m4gkrhLE_bu4JLOCJ42IEc8Af9jPA" width="25" height="25" /> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcReEOzJJmYWGu6oNM-Glf7iFSBh9HEDQVaq8QQu3gM0aK-DX_PEX33K6Q" width="25" height="25" /> <img src="http://t1.gstatic.com/images?q=tbn:ANd9GcQAt-OpvPKfWDsBoHugBjtp7Sg5umfsa29NtDr7ejcNroysMVoAk6p0Xg" width="25" height="25" /> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcTLcEyKcDAv2RbY5S4gPWvdCEoOCz0k9tGNcNm7QHnfBBZA0lhdqJfqJhvv" width="25" height="25" /> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcQdSmR7qcEhE7WvD_nKxQDL5LZS9RS1WcXmZJO9edojTYcv_oOYZkNf20Y" width="25" height="25" /> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcSkI0kA_HL9fvabGqZ6r9mg8_cJ2NF4whc8xRjv22bi2NyoOjVa2BjWPg" width="25" height="25" /> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcRzwfOXgu2m6F2Ivr9BgHjegnNHiqIgXTRcl5KZekGv9LwZ7Lghj-TaZ5io" width="25" height="25" /> <img src="http://t2.gstatic.com/images?q=tbn:ANd9GcR5WdHy4xITurTseqKaSxLg3ZrwIYdxWZw1LFZ08UiBDkwA3Zrbr6VYNg" width="25" height="25" /> <img src="http://t0.gstatic.com/images?q=tbn:ANd9GcT1wBuWv6Cy9b4Jz1YuqEMybKSUOxjj4RMV2grKjym8GuuuhnzFBe9sL7Q" width="25" height="25" />...
</derecha>
</Cuadro>
<Estados id="Estados"></Estados>
<Envio>
<input type="submit" name="Enviar" value="Enviar"/> <input type="button" onClick="Previsualizar(); return true;" value="Previsualizar" /> </Envio>
Ante la segura respuesta de que las etiquetas como <Estados> no sirven , hago la siguiente aclaracion : La pagina que estoy haciendo solo la hago para google chrome , ya se todos los problemas de compatibilidad con otros navegadores. Solo hago para chrome no cambiare esto.
y estas etiquetas funcionan ya que tengo otros codigos usandolos a la perfeccion.
Código Javascript
:
Ver originalfunction Enviar(){
var id = document.getElementById('Interprete').value;
var Interprete1 = document.getElementById('Interprete').selectedIndex;
var Interprete = document.getElementById('Interprete').options[Interprete1].text;
var Titulo = document.getElementById('Titulo').value;
var Ano = document.getElementById('Ano').value;
var Velocidad = document.getElementById('Velocidad').value;
var Servidor = document.getElementById('Servidor').value;
var Sello = document.getElementById('Sello').value;
var Descarga = document.getElementById('Descarga').value;
var Imagen = document.getElementById('Imagen').value;
// --- Variables ajax
var ajax = new XMLHttpRequest();
/* Estados */
ajax.onreadystatechange=function(){
/* Si se esta cargando */
if(ajax.readyState==1 || ajax.readyState==2 || ajax.readyState==3){
document.getElementById('Estados').innerHTML='Procesando su peticion...';
}
/* Si se cargo */
if(ajax.readyState==4 && ajax.status==200){
document.getElementById('Estados').innerHTML=ajax.responseText;
}
}
// --- Envios---
ajax.open("GET","Enviar.php?id="+id+"&Interprete="+Interprete+"&Titulo="+Titulo+"&Ano="+Ano+"&Velocidad="+Velocidad+"&Servidor="+Servidor+"&Sello="+Sello+"&Descarga="+Descarga+"&Imagen="+Imagen,true);
ajax.send(null);
}
Código PHP:
Ver original// --- Conexion mysql ---
// --- Variables ---
$Id = $_GET['id'];
$Interprete = $_GET['Interprete'];
$Titulo = $_GET['Titulo'];
$Ano = $_GET['Ano'];
$Imagen = $_GET['Imagen'];
$Velocidad = $_GET['Velocidad'];
$Servidor = $_GET['Servidor'];
$Sello = $_GET['Sello'];
$Descarga = $_GET['Descarga'];
// --- Insercion mysql ---
$Envio = mysql_query("INSERT INTO album (indentificador,id,Interprete,Imagen,Titulo,Ano,Velocidad,Servidor,Sello,Descarga, Usuarios,Valores,Megusta) VALUES ('','".$Id."','".$Interprete."', '".$Imagen."','".$Titulo."', '".$Ano."', '".$Velocidad."', '".$Servidor."', '".$Sello."', '".$Descarga."', '0', '0', '1');");
// --- Si Esta bien el envio ---
if($Envio){
echo 'El album se acabo de crear vease';
}
// --- Cerrando mysql ---