... and to prevent sql injection
$sql="SELECT * FROM foo WHERE name='".addslashes($_POST['name']).'"';
... and to reduce the data sent from the database
$sql="SELECT just, the, fields, you, want FROM foo WHERE name='".addslashes($_POST['name'])."'";
Oh, and Rojer, I'm not sure how much mysql_error() is going to do when using sqlite :rolleyes: 😉