|
|
|
|
![]() ![]() |
Nov 7 2006, 02:00 PM
Post
#1
|
|
|
Premium Member Group: Members Posts: 250 Joined: 6-July 06 From: The net (or at least that's what my family says) Member No.: 14,330 |
I'm new to PHP and still have much to learn.
I came across a free script to check google PR. You place a file called pagerank.php and then have an includes. So I did this: CODE <?php include('pagerank.php') ?> Then I have my HTML (the page header and so forth), and added a form where they can input their URL. The form action is CODE <form action="?url=<?php echo $_POST['url'] ?>" method="post" name="checkpr" id="checkpr"> First of all ... I seem to be missing something completely basic. My page isn't displaying at ALL as I expected. No graphic header and no form. It's actually showing all my HTML code instead of processing it. This happens when I put my include (as above) right at the top of the file. When I take it away, at least the graphics and the form look correct. So where is the CORRECT place to put the include code? Can someone make suggestions on how I messed up on this? Many thanks. |
|
|
|
Nov 7 2006, 04:58 PM
Post
#2
|
|
|
Premium Member Group: Members Posts: 292 Joined: 15-December 04 Member No.: 1,768 |
Link us to your page. Also make sure you upload the file with a .php extension. If you have a .html extension it will not parse your php code.
CODE <?php include 'pagerank.php'; ?> I'm not too sure if you should be getting an error since it's only one statement, but it's good practice to put a semicolon at the end of each statement. Not only is it good practice, but it's necessary in most languages. What exactly does this include file contain? If it contains some type of html content then you would have to include it after establishing your <body> tag. Please post your content of your file or attach your file itself so we can have a better look at it. Knowing the contents of the include file would also be helpful. |
|
|
|
Nov 8 2006, 07:24 PM
Post
#3
|
|
|
Premium Member Group: Members Posts: 250 Joined: 6-July 06 From: The net (or at least that's what my family says) Member No.: 14,330 |
Whether it is
CODE <?php include ('pagerank.php') ?> or CODE <?php include'pagerank.php'; ?> I still have the same issue. The page appears at: http://www.londonlink.ca/check_web_site_page_rank.php You can view the code at http://www.londonlink.ca/check_web_site_page_rank.phps the includes file is http://www.londonlink.ca/pagerank.php This post has been edited by ginginca: Nov 8 2006, 07:25 PM |
|
|
|
Nov 10 2006, 02:44 AM
Post
#4
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 |
CODE <?php include ('pagerank.php'); ?> this is the correct way to code this. Other ways may work but it is best to get in the habit of doind it right. Try moving that include from the top of the file to the bottom of the file. That is why your HTML isn't parsing correctly. Too much trash before the <html>! Without seeing the source to the pagerank.php script, I can't tell what other problems you are having. It seems like the script isn't working correctly. vujsa |
|
|
|
Nov 10 2006, 04:06 AM
Post
#5
|
|
|
Advanced Member Group: Members Posts: 112 Joined: 3-November 06 From: USA, CA, Los Angeles Member No.: 16,947 |
Well it seems like your website is working now and redirecting data over to page rank but it doesnt' seem to work. Instead of putting page rank at the buttom put it above the form. Since i don't have a copy ofr the script i can't test that theory.
|
|
|
|
Nov 12 2006, 08:26 PM
Post
#6
|
|
|
Premium Member Group: Members Posts: 250 Joined: 6-July 06 From: The net (or at least that's what my family says) Member No.: 14,330 |
Well it seems like your website is working now and redirecting data over to page rank but it doesnt' seem to work. Instead of putting page rank at the buttom put it above the form. Since i don't have a copy ofr the script i can't test that theory. The page will dispay in IE but not in FF. the pagerank script can be viewed at http://www.londonlink.ca/check_web_site_page_rank.phps |
|
|
|
Nov 12 2006, 09:04 PM
Post
#7
|
|
|
Premium Member Group: Members Posts: 250 Joined: 6-July 06 From: The net (or at least that's what my family says) Member No.: 14,330 |
When I move the includes statement to directly above the form, the page will display in FF. But I get an error now.
http://www.londonlink.ca/check_web_site_page_rank.php code is located at http://www.londonlink.ca/check_web_site_page_rank.phps I just learning, but it was my understanding if you are going to have PHP on your page you have to start the page with PHP. Is that not correct? Gin |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 12th October 2008 - 02:22 AM |