Quote:
Originally Posted by lenwhistler
Does it create a new row each time you submit the form?
Check the USER, PASSWORD, HOST and NAME values in your database connection file. Some or all of those values will be different for 000webhost.
----
|
everything is OK. Every time I submit the form a new row appears, but it is empty. I also tried to save data without mysql, into a .txt file. But the same thing: empty lines.
here is how the form is processed:
PHP Code:
<?php
include("config.php");
mysql_connect($dbhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die( "Unable to select database");
$date = date('Y-m-d H:m:s');
$query = "INSERT INTO $resultados VALUES ('','$ciudad','$edad','$coche','$modelo','$cilindrada','$combustible','$km','$compradopor','$gustando','$cambiar','$date')";
mysql_query($query);
mysql_close();
echo header("Location: index.php?page=gracias");
?>