Ver Mensaje Individual
  #8 (permalink)  
Antiguo 05/04/2013, 18:54
Shionix
 
Fecha de Ingreso: abril-2013
Ubicación: Puerto Rico (Mnes)
Mensajes: 20
Antigüedad: 11 años
Puntos: 0
Respuesta: Crear Twitter

ENVIA EL TWITT PARA QUE PUEDA PROCESAR crearTwitt.html
<html>
<head><title>formulario HTML twetter</title></head>
<body style="background-repeat: no-repeat; background-image: url(&quot;imagesenv.jpeg&quot;); background-size: cover;">

<div align="center">
<a href="index.html"><em><strong>INICIO</strong></em></a><br>
</div>

<form action="crearTwitter.php"/>
<p>

Ingrese su Twitt:
<br>
<textarea rows="5" name="mensaje" cols="50"></textarea>
</p>
<?php

?>
<input type="submit" value="Enviar"/>
</form>

</body>
</html>

************************************************** ******************************
CREA EL TWITT
crearTwitter.html
<html>
<head><title>formulario PHP twetter</title></head>
<body style="background-repeat: no-repeat; background-image: url(&quot;imagesenv.jpeg&quot;); background-size: cover;">


<?php
extract($_REQUEST);

if ($nombre && $mensaje ) {

mysql_connect ("localhost","usuario","contraseña");
mysql_select_db("twetter");

$usuario=mysql_query("SELECT NombreUsr FROM Registros WHERE NombreUsr = $nombre");
mysql_query( " INSERT INTO tbltwetter (Nombres,Twitters)".
"VALUES ('$usuario','$mensaje')" );
?>
<div align="center">
<h3>SU TWITT SE A CREADO EXITOSAMENTE</h3>
<p><h3>PARA VER SU TWITT Y EL DE LOS DEMAS PRESIONE VER</h3>
</p>
<a href="mostrarTwits.php"><em><strong>VER</strong></em></a><br>

</div>
<?php
$error=mysql_error();
$mensa=$mensaje;
print $error;
}
else{
?>
<div align="center">
<h3>USTED DEBE INGRESAR TODOS LOS DATOS PARA PODER TWITTEAR</h3>
</div>
<?php
}

?>
</body>
</form>
</html>

Última edición por Shionix; 05/04/2013 a las 19:02