Jump to content

cableuser

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cableuser's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I finally got the script working. I cant believe how much of an idiot I am as it had nothing to do with the script I just uploaded the wrong file to the database. Silly me [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /]
  2. 50webs.net is the site where I get my hosting from. The site says what login info I am supposed to use and I entered it in exactly as it said. I tried using local host but with same results as before.
  3. There is no double quotes at the end I do not know why the error message says I have double quotes but I do not. I just checked the php files. Also I do have a ; at the end of the statement. This doesnt make any since as I am positive what is in the mysql file is 100% correct. Here I will post what I have in there. [code] $dbhost = 'xxxxx.xxx'; $dbuser = 'xxxxxxxxxx_xxx'; $dbpass = 'xxxxxxxxx'; $dbport = '3306'; $conn = mysql_connect(xxxxxx.xxx, xxxxxxxxxx_xxx, xxxxxxxxx) or die                      ('Error connecting to mysql'); $dbname = 'xxxxxxxxxx_xxx'; mysql_select_db(xxxxxxxxxx_xxx); [/code]
  4. $dbhost = '50webs.net' MySQL said: Documentation #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '$dbhost = '50webs.net'' at line 1 this could be what is wrong. for some reason this line is wrong but I do not know why please advise.
  5. Ok, just adding the little thing you told be to the br_result one. I know get this error message. Error: Table 'bertschkid_max.bannerrotator' doesn't exist with query SELECT * FROM bannerrotator WHERE adgroup='Main' AND status='Normal' ORDER BY RAND() LIMIT 1
  6. Ok thanks. That problem is fixed. Now the only error I get is a query failed whatever that means. Please tell me what I should do to fix a query failed error. Thanks
  7. I will try that, thank you. Edit: I tried that but it still does not work.
  8. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.