Query bug, what is wrong?

From: Date: Fri, 08 Mar 2002 13:29:19 +0000
Subject: Query bug, what is wrong?
Groups: php.general 
Request: Send a blank email to php-general+get-87759@lists.php.net to get a copy of this message
<?php $qname = $HTTP_POST_VARS['ct_nome']; $qkey = $HTTP_POST_VARS['ct_kw']; $qdia = $HTTP_POST_VARS['ct_dia']; $qmes = $HTTP_POST_VARS['ct_mes']; $qano = $HTTP_POST_VARS['ct_ano']; $qautor = $HTTP_POST_VARS['ct_autor']; $qeng = $HTTP_POST_VARS['cS_eng']; $qdes = $HTTP_POST_VARS['cS_des']; $qFILE = "FILES"; $host = localhost; //Database Conection $link = mysql_connect($host,"root","root") or die("Not possible to connect"); print("Connection OK"); //Database Selection mysql_select_db("test") or die(mysql_error()); print("Selection OK"); $query = "INSERT INTO projeto (nome,setor,arquivo,status) VALUES ($qname,$qdes,$qFILE,'ok')"; print "$qname"; print "$qkey"; print "$qautor"; print "$qdia/$qmes/$qano"; //My Query mysql_query ($query) or Die (mysql_error()); echo "Projecto registered"; // Closing connection mysql_close($link); ?> Thanks you Daniel Castro

« previous php.general (#87759) next »