Help, my Database does not work
Posted by: Danro (---.201-252-75.telecom.net.ar)
Date: June 04, 2007 05:25PM

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"winking smiley;
$descriptor=mysql_select_db($BaseDeDatos,$conexion);
?>


archive almacenarDibujo.php

<?php
require("conect.php"winking smiley;
$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');"winking smiley;
$consulta = mysql_query("SELECT * FROM `nombre` ORDER BY `id` DESC limit 1"winking smiley;
$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]}');"winking smiley;


}
echo "&chivito=el dibujo fue guardado!";
?>


I would like anybody could help me, thanks in advance :smiling smiley

Options: ReplyQuote
Re: Help, my Database does not work
Posted by: Danro (---.201-252-75.telecom.net.ar)
Date: June 04, 2007 06:38PM

please anybody can help me!!! I can not fix the problem sad smiley

Options: ReplyQuote
Re: Help, my Database does not work
Posted by: CyberSpatium (71.237.217.---)
Date: June 05, 2007 01:59AM

change the first line of your conect.php from
<?

to
<?php

for more info, read my manual.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Cellular Phone Deals - The Best on the Net! - FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a FREE cellular phone with FREE shipping!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Mortgage and Home Loan Advice:
Clarify Loans

Options: ReplyQuote
Re: Help, my Database does not work
Posted by: Danro (---.201-252-75.telecom.net.ar)
Date: June 05, 2007 03:03AM

thanks now I can record but i have another problem sad smiley some fields of database dont update or do but with undefined value , i do not why is that , its pretty strange :/


i pass variables from flash to php

Options: ReplyQuote
Re: Help, my Database does not work
Posted by: CyberSpatium (71.237.217.---)
Date: June 06, 2007 12:07AM

here are some recent posts on my blog:

Creating and Using a Database with MySQL
http://webdevnewbie.com/2007/06/01/creating-and-using-a-database-with-mysql/

PHP MySQL Tutorial
http://webdevnewbie.com/2007/05/06/php-mysql-tutorial/

bookmark my blog, i add new tutorials all the time.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Cellular Phone Deals - The Best on the Net! - FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a FREE cellular phone with FREE shipping!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Mortgage and Home Loan Advice:
Clarify Loans

Options: ReplyQuote


Sorry, only registered users may post in this forum.