Help - Search - Members - Calendar
Full Version: Connecting to mySQL
Movable Type Community Forum > Additional Resources > Plugin Development and Usage
btm
I'm trying to develop a very simple script that will allow me to enter a day number and will record that number in a new table on the db along with the date and time and then display that entry on the sidebar (verrrry simple).

However, I can't connect to the db. I'm using the file
CODE
<?
// name of your database
$database = "akagicreative_com_-_weblog";

// connect to database
$db = mysql_connect("http://www.akagicreative.com/", "myusername", "mypassword");
mysql_select_db("$database",$db);
?>


I put the file in /cgi-bin/mt/php,
but when I access the file, I get a 500 internal server error. Is the php file in the wrong place? Am I accessing the db incorrectly? Thanks for your help.
imabug
PHP Manual
mysql_connect
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.