Yep, thats what i use now to insert the data in to the db.
my head is starting to hurt now lol.
OK so this is where i am at now.
In the pilot profile main i have added a button that needs to update a record in my database when pushed by the pilot, so here is the code im using,
<form action="../../insert.php" method="post">
<input name="pilotid" type="hidden" value="<?php echo $pilotcode; ?>" />
<input name="Username" type="hidden" value="<?php echo $userinfo->firstname . ' ' . $userinfo->lastname; ?> <?php echo $pilotcode; ?>" />
<input type="submit" value="Create Forum Account" />
</form>
Insert works fine but i want it to update a record where the pilot id is the pilots id.
When i hit the button i get “Error: Query was empty” here is also my insert.php cpde,
<code>
<?php
$con = mysql_connect(“localhost”,“removed”,“removed”);
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
mysql_select_db(“mydatabase”, $con);
mysql_query("UPDATE mydatabase SET fullid_name = ‘$_POST[username]’
WHERE s_client_name = ‘$_POST[pilotid]’");
if (!mysql_query($sql,$con))
{
die('Error: ’ . mysql_error());
}
echo “1 record added”;
mysql_close($con)
?>
</code>
Any help would be appreciated to fix this sucker as all i seem to do now is go round in circles and start to confuse myself even more
Thanks in advance.