nemxu Posted March 13, 2010 Share Posted March 13, 2010 Thanks for any who reads.... Basically I am trying to add a poll to my page... the link is ' http://biddingmalta.com/thetop10/content/poll.php '. But the problem is it doesn't want to show up on my page... I am using the following code <?php include("/home/bidding2/public_html/thetop10/content/poll.php"); ?> Is there something wrong with the code orrrrr could it be that the page I am trying to include it onto is already including the index content? e.g <?php include("/home/bidding2/public_html/thetop10/index2.php"); ?> Any help would be helpful!! Quote Link to comment Share on other sites More sharing options...
herghost Posted March 13, 2010 Share Posted March 13, 2010 what is the address of the page you are trying to display it from? Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted March 13, 2010 Share Posted March 13, 2010 If your displaying it from anywhere in the public_html folder. <?php include("thetop10/content/poll.php"); ?> If your displaying it from anywhere in the thetop10 folder. <?php include("content/poll.php"); ?> If you're displaying it from anywhere in the content folder. <?php include("poll.php"); ?> Quote Link to comment Share on other sites More sharing options...
nemxu Posted March 13, 2010 Author Share Posted March 13, 2010 Here is the code of the page I want it to show on.... (http://biddingmalta.com/thetop10/index2.php?page=wags) no under 18s <?php include("/home/bidding2/public_html/thetop10/index2.php"); ?><center> <br> <center><b>Top 10 Premier League Footballers Wives/Girlfriends!</b> (That currently play in the premier league!) Let's take the spotlight away from the 100K a week footballers and focus on something else with a little more vavavuum! <b>PREMIER LEAGUE WAGS!</B> Yes, that's right... WAGS! (that’s footballer’s wives and girlfriends) just in case you didn't know. So cast your eyes on these beauties! Click pictures to enlarge! <b>Cheryl Cole</b> Former 'Girls Aloud' singer and xFactor Judge. Wife to Ashley Cole (Chelsea F.C) <a href="/thetop10/images/cherylcole/cheryl_1.jpg"><img src="/thetop10/images/cherylcole/cheryl_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_2.jpg"><img src="/thetop10/images/cherylcole/cheryl_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_3.jpg"><img src="/thetop10/images/cherylcole/cheryl_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_4.jpg"><img src="/thetop10/images/cherylcole/cheryl_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_5.jpg"><img src="/thetop10/images/cherylcole/cheryl_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_6.jpg"><img src="/thetop10/images/cherylcole/cheryl_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_7.jpg"><img src="/thetop10/images/cherylcole/cheryl_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_8.jpg"><img src="/thetop10/images/cherylcole/cheryl_8.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_9.jpg"><img src="/thetop10/images/cherylcole/cheryl_9.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_10.jpg"><img src="/thetop10/images/cherylcole/cheryl_10.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_11.jpg"><img src="/thetop10/images/cherylcole/cheryl_11.jpg" width="225" height="225"></a> <a href="/thetop10/images/cherylcole/cheryl_12.jpg"><img src="/thetop10/images/cherylcole/cheryl_12.jpg" width="225" height="225"></a> <b>Victoria Beckham</b> Former 'Spice Girls' singeWife to David Beckham (L.A Galaxy -> Loan to A.C Milan) <a href="/thetop10/images/victoriabeckham/vicbeckham_1.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_2.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_3.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_4.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_5.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_6.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_7.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_8.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_8.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_9.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_9.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_10.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_10.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_11.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_11.jpg" width="225" height="225"></a> <a href="/thetop10/images/victoriabeckham/vicbeckham_12.jpg"><img src="/thetop10/images/victoriabeckham/vicbeckham_12.jpg" width="225" height="225"></a> <b>Alex Gerrard</b> Wife to Steven Gerrard (Liverpool F.C) <a href="/thetop10/images/alexgerrard/alexgerrard_1.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_2.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_3.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_4.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_5.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_6.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_7.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/alexgerrard/alexgerrard_8.jpg"><img src="/thetop10/images/alexgerrard/alexgerrard_8.jpg" width="225" height="225"></a> <b>Danielle Lloyd</b> Ex GF of ... Teddy Sheringham, Jermain Defoe and Jamie O'hara (Tottenham H.S) <a href="/thetop10/images/daniellelloyd/daniellelloyd_1.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_2.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_3.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_4.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_5.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_6.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_7.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_8.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_8.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_9.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_9.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_10.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_10.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_11.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_11.jpg" width="225" height="225"></a> <a href="/thetop10/images/daniellelloyd/daniellelloyd_12.jpg"><img src="/thetop10/images/daniellelloyd/daniellelloyd_12.jpg" width="225" height="225"></a> <b>Abigail Clancy</b> Peter Crouch's Girlfriend (Spurs F.C) <a href="/thetop10/images/abigailclancy/abigailclancy_1.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_2.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_3.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_4.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_5.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_6.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_7.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/abigailclancy/abigailclancy_8.jpg"><img src="/thetop10/images/abigailclancy/abigailclancy_8.jpg" width="225" height="225"></a> <b>Gemma Atkinson</b> Christiano Ronaldo's EX GF! <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_1.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_2.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_3.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_4.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_5.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_6.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_7.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/gemmaatkinson/gemmaatkinson_8.jpg"><img src="/thetop10/images/gemmaatkinson/gemmaatkinson_8.jpg" width="225" height="225"></a> <b>Carly (Zucker) Cole</b> Joe Cole's Wife <a href="/thetop10/images/carlyzucker/carlyzucker_1.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_2.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_3.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_4.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_5.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_6.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_7.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/carlyzucker/carlyzucker_8.jpg"><img src="/thetop10/images/carlyzucker/carlyzucker_8.jpg" width="225" height="225"></a> <b>Natalie Suliman</b> Kieran Richardson's GF <a href="/thetop10/images/nataliesuliman/nataliesuliman_1.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_2.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_3.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_4.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_5.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_6.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_7.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/nataliesuliman/nataliesuliman_8.jpg"><img src="/thetop10/images/nataliesuliman/nataliesuliman_8.jpg" width="225" height="225"></a> <b>Nikoleta Lozanova</b> Dimitar Berbatov's GF <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_1.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_2.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_3.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_3.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_4.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_5.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_5.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_6.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_6.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_7.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_7.jpg" width="225" height="225"></a> <a href="/thetop10/images/nikoletalozanova/nikoletalozanova_8.jpg"><img src="/thetop10/images/nikoletalozanova/nikoletalozanova_8.jpg" width="225" height="225"></a> <b>Vanessa Perroncel</b> Wayne Bridge's EX GF <a href="/thetop10/images/vanessaperroncel/vanessaperroncel_1.jpg"><img src="/thetop10/images/vanessaperroncel/vanessaperroncel_1.jpg" width="225" height="225"></a> <a href="/thetop10/images/vanessaperroncel/vanessaperroncel_2.jpg"><img src="/thetop10/images/vanessaperroncel/vanessaperroncel_2.jpg" width="225" height="225"></a> <a href="/thetop10/images/vanessaperroncel/vanessaperroncel_4.jpg"><img src="/thetop10/images/vanessaperroncel/vanessaperroncel_4.jpg" width="225" height="225"></a> <a href="/thetop10/images/vanessaperroncel/vanessaperroncel_5.jpg"><img src="/thetop10/images/vanessaperroncel/vanessaperroncel_5.jpg" width="225" height="225"></a> <?php include("poll.php"); ?> Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted March 14, 2010 Share Posted March 14, 2010 Then simply just use.. <?php include("content/poll.php"); ?> By the way, cheryl cole and ashley cole have split up. It's Cheryl Tweedy now. Quote Link to comment Share on other sites More sharing options...
nemxu Posted March 14, 2010 Author Share Posted March 14, 2010 She isn't divorced yet! lol Im still having a problem... The code isnt working... Have a LOOK FOR YOURSELF... at the bottom of the page... thanks http://thetop10women.com/index2.php?page=wags Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted March 14, 2010 Share Posted March 14, 2010 Well.. the poll link at the top of this thread doesn't work anymore. That could be your answer. Quote Link to comment Share on other sites More sharing options...
nemxu Posted March 14, 2010 Author Share Posted March 14, 2010 The poll at the top of the thread was on another site. Now I uploaded it to the proper domain... The code for the PHP Poll is <?php // Important! You have to include it before your html code include_once "/home/bidding2/public_html/thetop10women.com/polls/poll_cookie.php"; ?> <html> <body> <?php include_once "/home/bidding2/public_html/thetop10women.com/polls/booth.php"; echo $php_poll->poll_process(4); ?> </body> </html> For some reason it just doesnt want to show up.... If I put that exact code on one of the include pages e.g "page=wags" all the text shows on the page... its like its not reading the code.... Can I explain any better? Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted March 14, 2010 Share Posted March 14, 2010 remove the html and body tags. As your including it into a page which already has a body and html tags. You dont need to duplicate them. Does that work? Quote Link to comment Share on other sites More sharing options...
nemxu Posted March 15, 2010 Author Share Posted March 15, 2010 Nope it still doesn't work. I created a page for the poll just to check the code and it doesn't seem to work 'http://thetop10women.com/index2.php?page=poll_wags' (the code actually shows on the page) The page which I want the poll to show on is ' http://thetop10women.com/index2.php?page=wags ' so I tried to include it using the code below... <?php include("/home/bidding2/public_html/thetop10women.com/poll_wags.php"); ?> But nothing comes up.... Could it be that because wags.php is already being included so a double include won''t work? Im not the brightest with PHP but I can't seem to understand why it doesn't show... If I use the code they gave me to put on... it doesnt read the code... What am i doing wrong~? Quote Link to comment Share on other sites More sharing options...
xoligy Posted March 15, 2010 Share Posted March 15, 2010 <?php include("poll_wags.php"); ?> http://thetop10women.com/poll_wags.php Quote Link to comment Share on other sites More sharing options...
nemxu Posted March 15, 2010 Author Share Posted March 15, 2010 It still doesn't show up... have a look... http://thetop10women.com/index2.php?page=wags (at the very bottom after the last set of images... ) I used the code you gave me.... edit I tried something.... I uploaded a new page 'test.php' (http://thetop10women.com/index2.php?page=test) and the only code the page has is.... <?php include("poll_wags.php"); ?> and it doesn't show up when the test.php page is included... Then I uploaded the same test.php page to the main directory (where index.php is) and it worked.... Something is going wrong.... http://thetop10women.com/test.php Could there be something wrong with my include code?? I use this code in index2.php <?php $page = $_GET['page']; $page = trim(strip_tags(addslashes(htmlentities($page)))); $directory = "/home/bidding2/public_html/thetop10women.com/content/"; if($page) { if(file_exists($directory . $page . ".php")) { $file = file_get_contents($directory . $page . ".php"); echo nl2br($file); } else { echo "This page does not exist!"; } } else { } ?> Thanks for your patience. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.