It is currently Sun Feb 25, 2018 9:56 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: PHP and MYSQL
PostPosted: Sun Nov 06, 2005 12:46 pm 
Noobie
Noobie

Joined: Tue Oct 25, 2005 10:05 am
Posts: 9
What the hell is wrong in this code????
<?
@mysql_connect("farvista.net","hpchat2_forum","*******") or die("Error con");
@mysql_select_db("hpchat2_forum") or die("Error selecting database");
$query="INSERT into hacked VALUE(\"2\",\"2\")";
$result=mysql_query("$query") or die ("error writing");

?>

it keeps giving me the 'error writing' erroe i assigned


Top
 Profile  
 
 Post subject: Re: PHP and MYSQL
PostPosted: Sun Nov 06, 2005 3:24 pm 
Posts like crazy!
Posts like crazy!

Joined: Mon Sep 26, 2005 5:03 pm
Posts: 204
Location: The Netherlands
<?
@mysql_connect("farvista.net","hpchat2_forum","*******") or die("Error con");
@mysql_select_db("hpchat2_forum") or die("Error selecting database");
$query="INSERT into hacked VALUES(\"2\",\"2\")";
$result=mysql_query($query) or die ("error writing");

?>

Don't put quotes around a variable. ($query)

Edit: And it is suppose to be 'VALUES' instead of 'VALUE'.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 11:55 am 
Noobie
Noobie

Joined: Tue Oct 25, 2005 10:05 am
Posts: 9
Big thx to you :D :lol: :o :) :P :wink:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ]  Moderators: fhmagic, KJ, Support Team, Moderators

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011