Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Google Ads In PHP

  1. #1
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801

    Google Ads In PHP

    I can't get google ads to show in my php... Someone help me... I'm using the '; type of ending and the echo ' type of starting.

  2. #2
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    Not quite sure what you mean... But where you want the google ads to show just come out of php and paste in the normal adsense javascript...

    PHP Code:
    <?php  all your php stuff here ?>

    adsense javascript here

    <?php back into php here ?>
    Get the idea? You shouldn't use echo to display everything. In fact, it's faster not to.

  3. #3
    Site Contributor
    Join Date
    Oct 2003
    Location
    Sweet Carolina
    Posts
    736
    Do you want to use a PHP include?

  4. #4
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Also I can't connect to the database...

  5. #5
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Originally posted by chromate
    Not quite sure what you mean... But where you want the google ads to show just come out of php and paste in the normal adsense javascript...

    PHP Code:
    <?php  all your php stuff here ?>

    adsense javascript here

    <?php back into php here ?>
    Get the idea? You shouldn't use echo to display everything. In fact, it's faster not to.

    I copied your code but it didnt like it...

  6. #6
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    OK, i altered your code and got the ad to display... now its ignoring my text-decoration:none; thing and underlining some link I don't want it to underline... And I still can't get it to connect to the database...

  7. #7
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    I won't display what it's supposed to display with echo $row['content'];...

    Is it because my table has no key?

  8. #8
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    Without looking at the whole thing, it's too hard to tell. You'll need to paste more of the code to give us a bigger picture.

  9. #9
    Site Contributor
    Join Date
    Oct 2003
    Location
    Sweet Carolina
    Posts
    736
    You could just put the ads in an include. It'll have the same effect as the database, more or less. It'll save you a lot of time if you're having this much trouble.

  10. #10
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    All sorted now

    The content wasn't showing as one of the variables wasn't set to the right number. Happened with me first time I tried it
    Don't you just love free internet games ?

  11. #11
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    See... I'm following the fabled route of Mike...

    Mmm... Making a template site... Wait... I'll do that AFTER I make a site called gawmir.com with someone with a first name starting with ga and a lastname starting with w...

  12. #12
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    wtf?
    Don't you just love free internet games ?

  13. #13
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Mmm... Build site for rubbish local band and host on gawmir.com...

  14. #14
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    Incka, your really starting to piss me off now. You do nothing but post stupid comments, you don't know how to use the edit button, and I bet there's plenty more bad habits as well.

    Grow up.
    Don't you just love free internet games ?

  15. #15
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Oh come on, it's a forum, have a laugh once in a while...

Similar Threads

  1. Review: Google Adsense
    By Chris in forum Advertising Networks
    Replies: 16
    Last Post: 12-02-2017, 02:32 AM
  2. Review: Professional PHP Programming
    By Chris in forum Books
    Replies: 6
    Last Post: 07-17-2013, 05:26 AM
  3. Local Rank stuff...
    By chromate in forum Search Engine Optimization
    Replies: 41
    Last Post: 02-07-2004, 03:53 PM
  4. how is this possible on google
    By Kyle in forum Search Engine Optimization
    Replies: 9
    Last Post: 01-28-2004, 05:40 AM
  5. Has Google danced this month?
    By callenb in forum Search Engine Optimization
    Replies: 1
    Last Post: 08-04-2003, 03:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •