![]() |
Adsense Code problems
I have a wierd problem with my google adsense. I am trying to store the code in mysql and print it from a variable so that I can display different ads easily.
Problem is the google adsense does not show. It is in the source It creates a large area that it could fit into, but doesnt show the ad. If I hard code in the script it works just fine. Im using mysql and I have tried storing the code in a varchar and in a text field. Any Ideas? |
You sure the code is exact? I know the google code actually creates an iframe, but that does not seem like the likely reason. If you are putting the exact adsense code into the database, and simply retrieving it and outputing it, everything should work accordingly. Can you post your code?
|
here is what the page outputs if you view the source.
Ijust added some spacing to see it better. Code:
<div class="rightArea">Code:
<script type="text/javascript"><!--Query PHP Code:
Output PHP Code:
|
*double post*
Everytime I go to edit something I end up putting it in the quick reply by accident grr. |
Ah, you are commenting out your google ad id with this line:
Code:
<!-- google_ad_client = "pub-9855112947620642";Do you see the difference where the one copied straight from google, the <!-- is on a different line: Code:
<script type="text/javascript"><!-- |
| All times are GMT. The time now is 12:41 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0