Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Installed A PR Checker Script - But Not Working Correctly
ginginca
post Nov 7 2006, 02:00 PM
Post #1


Premium Member
Group Icon

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.
Go to the top of the page
 
+Quote Post
minnieadkins
post Nov 7 2006, 04:58 PM
Post #2


Premium Member
Group Icon

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.
Go to the top of the page
 
+Quote Post
ginginca
post Nov 8 2006, 07:24 PM
Post #3


Premium Member
Group Icon

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
Go to the top of the page
 
+Quote Post
vujsa
post Nov 10 2006, 02:44 AM
Post #4


Absolute Newbie
Group Icon

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
Go to the top of the page
 
+Quote Post
Levis
post Nov 10 2006, 04:06 AM
Post #5


Advanced Member
Group Icon

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.
Go to the top of the page
 
+Quote Post
ginginca
post Nov 12 2006, 08:26 PM
Post #6


Premium Member
Group Icon

Group: Members
Posts: 250
Joined: 6-July 06
From: The net (or at least that's what my family says)
Member No.: 14,330



QUOTE(Levis @ Nov 9 2006, 11:06 PM) *

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
Go to the top of the page
 
+Quote Post
ginginca
post Nov 12 2006, 09:04 PM
Post #7


Premium Member
Group Icon

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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To Make A Text Based Online Game Script ?(23)
  2. PHP: Writing A Generic Login And Register Script(14)
  3. How To Save A Image In Pdf File And Download It?(10)
  4. Bash Script To Display Your Ip(9)
  5. System Sounds Not Working(9)
  6. Help Needed To Create Login Script With Perl/cgi(21)
  7. Need Help With A PHP - MySQL Registration Script(13)
  8. PHP Tutorial: Form Verification And Simple Validation(12)
  9. ATI Radeon 9250 Issues(8)
  10. Problems Installing Vista(14)
  11. Running Vba Script In Excel(6)
  12. Direct3d Setrenderstate(d3drs_zenable,true) Has No Effect ?(4)
  13. Help, My Laptop Charger Is Not Working Properly(17)
  14. Installing Glut To Dev C++(3)
  15. Very Simple Login-script(18)
  1. A Simple Register Script(3)
  2. Auto-click Script(7)
  3. Myspace Gold Script(2)
  4. Looking For Script(5)
  5. Need Help Making My Ftp Work(14)
  6. View New Posts Not Working(12)
  7. Creating A Php Login Script(3)
  8. Myspacetv Download Php Script Help(6)
  9. Why I May Be Installing Windows Xp Sp3 Again(8)
  10. Installing Xp And Vista Together(6)
  11. Cpanel Isn't Working.(14)
  12. Automatic Typing Script(3)
  13. [fl]snow Effect(3)


 



- Lo-Fi Version Time is now: 12th October 2008 - 02:22 AM