Jump to content
xisto Community
Sign in to follow this  
ginginca

Installed A PR Checker Script - But Not Working Correctly

Recommended Posts

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:

 

<?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

 

<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.

Share this post


Link to post
Share on other sites

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.

<?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.

Share this post


Link to post
Share on other sites

Whether it is

<?php include ('pagerank.php') ?>

or

<?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
Edited by ginginca (see edit history)

Share this post


Link to post
Share on other sites
<?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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.