Hi I have a php based site- single page site ( but shows different data on each page from database quries).,, no script I want to show some stuffs on homepage only how can i do that? plz help thanks
Check the link in my sig called naruto episodes I did what you are looking to do. You need to do a mysql query for the get variable then get the returned value from the database and insert that variable into the html of the page. to have multiple get values you can do.. http://www.examplesite.com/test.php?get1=X&get2=Y&get3=Z then on the following page(ie: test.php) say $X = $_GET['1']; $Y = $_GET['2']; $Z = $_GET['3']; $X would return X $Y would return Y $Z would return Z then search the database for the value of the variable... WARNING THIS IS NOT SECURE... need more help send me a pm...
We can do this in two ways. We can either edit our theme and insert the ad code to show the ad or we can use a wordpress plugin called Whydowork Adsense to do this automatically. Let’s know both tricks step by step. Edit Theme to show Ads on Wordpress Homepage Only 1. Login to your Wordpress dashboard 2. Navigate to Appearance >> Editor >> Index.php 3. Choose the location where you want to display the ad and paste the following code there <?php if(is_home() && $post==$posts[0] && !is_paged()) { ?> YOUR ADVERTISEMENT CODE HERE <?php } ?> 4. Replace the line YOUR ADVERTISEMENT HERE with your ad code. 5. Save the changes and you are done.
submit the ad code into your data base and take the id of that row. Now simply put this code in the block where you want to load the ad: $query = mysql_query("SELECT * FROM [i]table-name[/i] WHERE id='[i]id[/i]'"); $result = mysql_fetch_array($query); echo $result['[i]variable[/i]']; Code (markup): another way which shall save database query shall be : echo "ENTER YOUR CODE HERE AND replace quotes with \""; Code (markup):
How are you getting the content from the database? is that by while()... It shall be better if you can give a better overview of your script.