Current time: 04-18-2014, 01:03 AM Hello There, Guest! (LoginRegister)

Post Reply 
why dont save in mysql
10-20-2007, 07:46 AM
Post: #11
why dont save in mysql
@require_once('..\default.php'); <-- this wont work at DH as it's in windows format. Linux paths are marked with forward slashes "/" not back slashes.

No error is shown because using "@" at the start of the line hides all errors. It's bad practice to code hiding errors. It makes things harder to debug as you have just found out. Also if things go wrong you should use proper error handling to deal with it, not just suppress the error and carry on with the script
Find all posts by this user
Quote this message in a reply
10-22-2007, 03:30 AM
Post: #12
why dont save in mysql
ty ecvej
the slash i have in the server is in Linux format, changed this friday, but i copy the lines from my local pc. The problem isn't this one. I know that @ hides all errors, and i tested the page removing all @, but no error showed.
Now it show an error that said "Interfaz no compatible" when click in save "Guardar" button.
Find all posts by this user
Quote this message in a reply
10-22-2007, 10:27 AM
Post: #13
why dont save in mysql
Try the script in its simplest form to get it working. IE feed it values rather than determine them. This will narrow down where the problem is.

Quote:mysql_connect('someDHsqlServer.com', 'username', 'password') or die('Could not connect to database');
echo 'Connected successfully<br/>';

mysql_select_db('databaseName') or die('Could not select database');
echo 'Selected database successfully</br>';

mysql_query("INSERT INTO noticias (titulo, texto, fecha) VALUES ('1', '2', '3')");
if (!mysql_affected_rows())
{
echo mysql_error();
}
else echo 'record inseted ok';
Also please confirm you are using a DH SQL server and that you have granted insert and update permission to the database user?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: