WEB What the HELL is wrong with my code, and how to I fix it???

Discussion in 'OT Technology' started by Blazed Monkey, Dec 20, 2007.

  1. Blazed Monkey

    Blazed Monkey It puts the lotion on its skin....

    Joined:
    Oct 30, 2002
    Messages:
    15,569
    Likes Received:
    0
    I've been banging my head against the wall for the last hour trying to figure this out myself cause I want to learn, but I can't fucking figure it out and it's driving me nuts :run:


    I want this:
    [​IMG]




    To look like this:
    [​IMG]




    This is what I have so far, but I know something is missing cause no matter how I adjust it, I keep breaking something:
    Code:
    <?php
    echo $important;
    echo "</h4>";
    if($found==1) {
    	echo "<div class=\"contentarea\">";
    	echo"<p> Please wait while we privately redirect you. <img src=\"http://www.refblock.com/images/loading.gif\" ></p>";
    	echo "<ul class=\"controls\">";
    		echo file_get_contents("fastlinkabove.txt")
    		echo "<li>If you do not wish to wait, <a href=\"#\" onclick=\"load()\" class=\"more\">click here.</a></li>"
    		echo file_get_contents ("fastlinkbelow.txt");
    	echo "</ul>";
    echo "</div>";
    }
    else {
    	echo "\n<p>Please <a href=\"setlink.php\">click here</a> to make a new link.</p>";
    }
    ?>

    fastlinkabove.txt and fastlinkbelow.txt are where I put my google ads script cause that's the solution I found with a google search. But now I'm stuck. I can't get the new line breaks between the ads and the "If you do not wish to wait, please click here" to come out right.



    What am I doing wrong?
     
  2. TheDarkHorizon

    TheDarkHorizon \xC0\xFF\xEE

    Joined:
    Sep 26, 2002
    Messages:
    2,396
    Likes Received:
    0
    Location:
    San Francisco, CA
    What does it look like now? Can you put a static copy of how it looks broken online?
     
  3. Blazed Monkey

    Blazed Monkey It puts the lotion on its skin....

    Joined:
    Oct 30, 2002
    Messages:
    15,569
    Likes Received:
    0
    it doesn't show anything, I just keep getting various php errors that stop the page from loading :hs:

    the one time I got it to load correctly, the ads were on the same line as the "If you do not wish to wait" message, and they were all squished on 1 line.
     
  4. TheDarkHorizon

    TheDarkHorizon \xC0\xFF\xEE

    Joined:
    Sep 26, 2002
    Messages:
    2,396
    Likes Received:
    0
    Location:
    San Francisco, CA
    What errors are you getting?
     
  5. TheDarkHorizon

    TheDarkHorizon \xC0\xFF\xEE

    Joined:
    Sep 26, 2002
    Messages:
    2,396
    Likes Received:
    0
    Location:
    San Francisco, CA
    I'm not seeing a semicolon after the first echo file_get_contents(...) and the echo statement after that.
     
  6. Blazed Monkey

    Blazed Monkey It puts the lotion on its skin....

    Joined:
    Oct 30, 2002
    Messages:
    15,569
    Likes Received:
    0
    with semicolons:


    [​IMG]



    The fucked up garbled script is actually a google ad for hurricane relief :mamoru:
     
  7. TheDarkHorizon

    TheDarkHorizon \xC0\xFF\xEE

    Joined:
    Sep 26, 2002
    Messages:
    2,396
    Likes Received:
    0
    Location:
    San Francisco, CA
    Try: echo '<li>' . file_get_contents("fastlinkabove.txt") . '</li>';
     
  8. Blazed Monkey

    Blazed Monkey It puts the lotion on its skin....

    Joined:
    Oct 30, 2002
    Messages:
    15,569
    Likes Received:
    0
    looks the same as the last pic I posted :hs:
     
  9. Blazed Monkey

    Blazed Monkey It puts the lotion on its skin....

    Joined:
    Oct 30, 2002
    Messages:
    15,569
    Likes Received:
    0
    You gave me the the idea I needed:

    Code:
    echo file_get_contents("fastlinkabove.txt") . '<br>';
    echo "<li>If you do not wish to wait, <a href=\"#\" onclick=\"load()\" class=\"more\">click here.</a></li>" . '<br>';
    echo file_get_contents("fastlinkbelow.txt") . '<br>';
    It works now :h5:
     
  10. Blazed Monkey

    Blazed Monkey It puts the lotion on its skin....

    Joined:
    Oct 30, 2002
    Messages:
    15,569
    Likes Received:
    0
  11. yeah if you have <li> elements in your css file you want to implement into anything that is echoed, you have to add the <li> to the echos as well. ran into the same thing when working on a custom cms project.
     
  12. crazybenf

    crazybenf Active Member

    Joined:
    Nov 14, 2001
    Messages:
    15,575
    Likes Received:
    2
    :coold:


    I saw that this morning... was wondering how the fuck you managed to get arabic text in a google ad. :rofl:
     

Share This Page