Re: error in my program
| From: | Gabor Hojtsy | Date: | Wed, 12 Apr 2006 20:02:57 +0000 |
| Subject: | Re: error in my program | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-31175@lists.php.net to get a copy of this message | ||
Hi!
Since your problem has nothing to do with webmastering of the php.net
website, it does not belong in here.... Please contact
php-general@lists.php.net (a mailing list) with support questions or see
http://php.net/support for more support options.
Regards,
Gabor Hojtsy
David Santiago wrote:
> Hi:
>
> I am Jose David, from Puerto Rico. I have a program to writing in a
> database mysql but not write. The program is local because is a
> proccesor of an variables on flash game.
>
> I need know whats is then problem please.
>
> This it a source:
>
> <FORM ACTION=pruebaescritura.php METHOD=post target="_self">
>
> <p>Nombre:
> <INPUT NAME=named TYPE=text id="named">
> <BR>
> <br />
>
> direccion:
> <INPUT NAME=addr TYPE=text id="addr">
> <BR>
> <br />
>
> telefono:
> <INPUT NAME=phone TYPE=text id="phone">
> <BR>
> <br />
> email:
> <INPUT NAME=email TYPE=text id="email">
> <BR>
> <br />
> score:
> <INPUT NAME=whacks TYPE=text id="whacks">
> <br />
> <br />
> <input type=submit name=OK value="INSERT" />
> <br />
> </p>
> </FORM>
> </HTML>
>
> <?php
> // coneccion al servidor de bases de datos
> if ($OK == "INSERT") {
> $dbh= mysql_connect ("localhost", "root", "")or die
> ('problema
> conectando porque :' . mysql_error());
> // seleccionado la base de datos
> mysql_select_db ("junglegame", $dbh);
> //construyendo insert
> mysql_query("INSERT INTO registro (nombre, direccion, telefono, email,
> score) VALUES (".$named.",".$addr.",". $phone.",".
> $email.",".whacks.")", $dbh) or die ("problema con query");
> //avisando
> echo "registro insertado <br>";
> };
> ?>
>
> The error is: Query error
>
> Thanks for your time
>