make sure you are running your database stuff all on the server, and not clientside. If you run it clientside then you are going to have a million security problems to deal with.
I would recommend getting the ASP module for Apache, and use JavaScript/ODBC in the ASP pages.
ASP is really pretty simple and there are millions of resources on the web, just check google.