Insert data to my table

wxdqz

New Member
I can't insert my data into my table, am I missing something here. Is it my access to mysql server? please help. here's my code:

<?php
$connect = @mysql_connect("localhost","anonymous","");
if(!$connect) die("Could not connect to MySQL Server");
else echo("Connected");
@mysql_select_db(learndb,$db);
if (!$db) echo("<br>Cannot retreive data!");
# $mydata = "INSERT INTO client_user SET fullname = '$author'";
$mydata = "INSERT INTO client_user VALUES (fullname) ('$author')";
if (mysql_query($mydata))
echo ("<p>Data successfully updated!</p>");
else
echo ("<p>Error adding submitted form:</p>" .mysql_error());

?>
</body>



This is the output of my code.....

Connected
Cannot retreive data!

Error adding submitted form:

You have an error in your SQL syntax near '('sdfsdf')' at line 1
 
Back
Top