Finally! I think I may have found a site that can help me with my problem. I am very much a noob at all this so dont try to give me any techno php lingo on how to go about things. I am pretty sure I am just missing something little but I have no idea what to look for so thats why I am here. I did actually get connected to the database though! I am proud of that accomplishment. [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] Now its just a matter of guess, test, and revise for me as I do not know what is supposed to be there and what is not. So now I am getting this: Parse error: parse error, unexpected T_STRING in /home/www/maxabileousexchange.com/bannerrotator.php on line 16 That line of code goes as follows: [code]mysql_select_db("xxxxxxxxxx_xxx") or die("Could not select database")[/code] Ok here is the entire code [code]<? // This script is copyrighted to Pullan Enterprises // You are not allowed to copy this script // If you modify this script you may not claim copyrights. // You are not allowed to remove this header // We will take legal action against all violators. function brotator($br_rid) { foreach (array_keys($GLOBALS) as $i) {if(!isset(${$i})) global ${$i};} $br_exptype = "Date (YYYYMMDDHHMMSS)"; if (!$db) { $db = mysql_pconnect("xxxxxxx", "xxxxxxxx", "xxxxxx") or die("Could not connect") mysql_select_db("xxxxxxxx") or die("Could not connect") } $br_updatesql = "UPDATE bannerrotator SET status='Expired' WHERE exptype='$br_exptype' AND expires<=$now"; $br_updateresult = mysql_query($br_updatesql); $br_sql2 = "SELECT * FROM bannerrotator WHERE adgroup='$br_rid' AND status='Normal' ORDER BY RAND() LIMIT 1"; $br_result2 = mysql_query($br_sql2) or die("Query failed"); $br_myrow2 = mysql_fetch_array($br_result2); $br_tid = $br_myrow2["id"]; $br_newviews = $br_myrow2["views"] + 1; if ($br_myrow2["exptype"] == "Views" && $br_newviews == $br_myrow2["expires"]) { $br_sql3 = "UPDATE bannerrotator SET views=views+1,status='Expired' WHERE id='$br_tid'"; } else { $br_sql3 = "UPDATE bannerrotator SET views=views+1 WHERE id='$br_tid'"; } $br_result3 = mysql_query($br_sql3) or die("Query failed"); if ($br_myrow2["type"] == "HTML") { echo $br_myrow2["html"]; } elseif ($br_myrow2["type"] == "Image") { ?> <a href="<?php echo $url ?>/bclick.php?go=<?php echo $br_myrow2["id"] ?>" target="_blank"><img src="<?php echo $br_myrow2["image"] ?>" ALT="<?php echo $br_myrow2["alt"] ?>" border="0" height="<?php echo $br_myrow2["ih"] ?>" width="<?php echo $br_myrow2["iw"] ?>"></a> <?php } } ?>[/code] I am assuming I am missing an some little puntuation of some sort so please advise. Thanks