grifter7
08-09-2009, 11:16 AM
I have set up a link between my Microsoft Access Database and myphpadmin server which i know works as i can see the changes being made between them... awesome. But i don't know how i can update my SQL database as no code i try works bearing in mind im trying to edit the server sql not access heres the code im trying very basic but it sdoesnt update and doenst give any error messages D: im really lost
<?php
$username="$_POST('username')";
$password="$_POST('password')";
$con = mysql_connect("localhost:3306","free","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test",$con);
mysql_query("INSERT INTO accounts(ID, Username, Password, E-mail, Privileges) VALUES ('$auto', 'space', 'cake', 'spacial_cake@hotmail.com', 'Client')");
mysql_close($con);
?>
<?php
$username="$_POST('username')";
$password="$_POST('password')";
$con = mysql_connect("localhost:3306","free","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test",$con);
mysql_query("INSERT INTO accounts(ID, Username, Password, E-mail, Privileges) VALUES ('$auto', 'space', 'cake', 'spacial_cake@hotmail.com', 'Client')");
mysql_close($con);
?>