formulario flash
DESCRIPTION
Flash Php MySQLTRANSCRIPT
![Page 1: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/1.jpg)
Formulario Flash, Mysql, php.
Karina JiménezSistemas Informáticos y Computación
![Page 2: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/2.jpg)
Para crear formularios en flash y que se guarden datos en Mysql
utilizando php.Base de Datos MySQl Un archivo en php para que se conecte a la
base de datos.Un formulario en flash para enviar las
variables con los valores a MySQL.
![Page 3: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/3.jpg)
Crea el Formulario. !
![Page 4: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/4.jpg)
Asigna Variables a los Campos de Texto y Botones en la barra Propiedades.
![Page 5: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/5.jpg)
Las cajas de texto van con la propiedad introducción de texto.
Y los botones se los convierte en Movie Clips; para luego convertirlo en botón.
![Page 6: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/6.jpg)
![Page 7: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/7.jpg)
![Page 8: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/8.jpg)
stop();function guardar(){
nombre=txtnombre.text;apellido=txtapellido.text;edad=txtedad.text;telefono=txtelefono.text;
Guardar=new LoadVars();//enviamos las variables de flash a php
Guardar.nombre=txtnombre.text;Guardar.apellido=txtapellido.text;Guardar.edad=txtedad.text;
Guardar.telefono=txtelefono.text;Guardar.onLoad=function(){
salida(this.resultado)}
Guardar.sendAndLoad("insertarDatos.php",Guardar,"post");}
![Page 9: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/9.jpg)
function borrar(){txtnombre.text="";txtapellido.text="";txtedad.text="";txtelefono.text="";txtSalida.text="";
}
function salida(str){txtSalida.text+=str;txtSalida.scroll=txtSalida.maxscroll;
}
![Page 10: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/10.jpg)
En el archivo php?<?$basedatos="flashdatos"; $conexion = mysql_connect ("localhost","root","");
mysql_select_db($basedatos, $conexion);
if($REQUEST_METHOD == "POST"){// Convierte todos los caracteres a su entidad HTML aplicable
$nom = htmlentities($_POST[nombre]);$apell = htmlentities($_POST[apellido]);$ed = htmlentities($_POST[edad]);$tel= htmlentities($_POST[telefono]);
![Page 11: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/11.jpg)
if ($nom!="" && $apell!="" && $ed!=0 && $tel!=0){
$consulta = "INSERT INTO `datospersonales` VALUES ('', '".$nom."', '".$apell."', '".$ed."','".$tel."');";
mysql_query($consulta, $conexion);echo "resultado=Insertado
Correctamente!";}else{echo "resultado=Corriga los Campos!";
}}
?>
![Page 12: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/12.jpg)
Puede agregar código para validar los datos.
![Page 13: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/13.jpg)
![Page 14: Formulario Flash](https://reader033.vdocuments.net/reader033/viewer/2022061515/557b8e38d8b42afa6f8b4cdf/html5/thumbnails/14.jpg)