Posted by:
Danro
(---.201-252-75.telecom.net.ar)
hi, My phpadmin works well, i could create my database . I use the root user without password , but the database is empty, dates could not record
when i type in the command console mysql it shows me "ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) "
I use this code to use the MySQL DATbase (The variables are passed from flash)
archive Conect.php
<?
$Servidor = 'localhost';
$Usuario = "root";
$Password = "";
$BaseDeDatos = "libro_pizarra";
$conexion=mysql_connect($Servidor,$Usuario,$Password) or die("Error: El servidor no puede conectar con la base de datos"
;
$descriptor=mysql_select_db($BaseDeDatos,$conexion);
?>
archive almacenarDibujo.php
<?php
require("conect.php"
;
$matrizX=$_POST['matrizX'];
$matrizY=$_POST['matrizy'];
$elEstado=$_POST['elEstado'];
$phpNombre=$_POST['nombre'];
$phpX = explode(",",$matrizX);
$phpY = explode(",",$matrizY);
$estadoDibujo = explode(",",$elEstado);
mysql_query("INSERT INTO nombre (`id`, `nombreDibu`) VALUES ('', '$phpNombre');"
;
$consulta = mysql_query("SELECT * FROM `nombre` ORDER BY `id` DESC limit 1"
;
$resultado = mysql_fetch_array($consulta);
$id_nombre = $resultado['id'];
for ($i = 0 ; $i <= count($phpX) ; $i++) {
mysql_query("INSERT INTO puntos (`id`, `id_dibujo`, `estado`, `posicionX`, `posicionY`) VALUES ('', '$id_nombre', '$estadoDibujo[$i]', '{$phpX[$i]}', '{$phpY[$i]}');"
;
}
echo "&chivito=el dibujo fue guardado!";
?>
I would like anybody could help me, thanks in advance :