I am starting a training series tomorrow, and the class files were sent to me in different formats, JSP, ASP, PHP, etc. Well I am using MAMP Pro on my mac, so I of course chose to use PHP. Well the PHP files contain this odbc_connect("Presidents",
, ) line to connect to a DB. I was told this is DSN??? I noticed that there is a program called ODBC Administrator which is for setting up DSN's, this software comes with my Mac. I have setup all of the DB's correctly in MySQL, so that is good to go. And I even downloaded the mysql ODBC driver, which now shows up in ODBC, but I still can't figure out what to do from here.
This is a MAJOR rush!
Another point, should I just go in and change all of the connection files to just connect to MySQL normally, the way I normally do in PHP?
$connect = odbc_connect("Presidents","","");
$sql = "SELECT FirstName, LastName, StartYear, EndYear, ImagePath
FROM Presidents WHERE PresidentID=" . $_GET["Slide"];
$rs = odbc_exec($connect, $sql);
if ( $row = odbc_fetch_row($rs) )
$firstName = odbc_result($rs, 1);
$lastName = odbc_result($rs, 2);
$startYear = odbc_result($rs, 3);
$endYear = odbc_result($rs, 4);
$imagePath = odbc_result($rs, 5);
<Years>$startYear - $endYear</Years>