Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mysql_host = "mysql10.000webhost.com";
- $mysql_database = "a3148355_datos";
- $mysql_user = "a3148355_datos";
- $mysql_password = "wilson083";
- $nombre = $_POST['nombre'];
- $nombre = mysql_escape($nombre)
- $sql = "INSERT INTO tabla(nombre) VALUES(".$nombre.")"
- $query = mysql_query($sql);
- switch($query){
- case true:
- echo "Datos guardados";
- break;
- case false:
- echo "Ocurrio un error";
- break;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement