Viewing source code of web site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Viewing source code of web site

Post by Todlerone »

I just looked at the source code for my site. Is there anyway of not having the MySQL data displayed in it (as it is a large table) or is there no way (because it is echo'd to the screen). It doesn't really bother me I was just curious.

CHEERS
Bal
Forum Newbie
Posts: 9
Joined: Tue May 27, 2008 11:45 am

Re: Viewing source code of web site

Post by Bal »

Maybe I'm just not understanding what you mean. Try posting some of the code for an analysis. Far as I can think of the only way to get your DB info printed into a web page is to put effort into it.
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Viewing source code of web site

Post by Todlerone »

Bal wrote:Maybe I'm just not understanding what you mean. Try posting some of the code for an analysis. Far as I can think of the only way to get your DB info printed into a web page is to put effort into it.
The site is up and running and all is great. When your viewing the page in IE and you right mouse click to view "source code" I see the contents of my whole database.

Cheers
Bal
Forum Newbie
Posts: 9
Joined: Tue May 27, 2008 11:45 am

Re: Viewing source code of web site

Post by Bal »

Uh.. I've never even heard of such a problem. What are you doing to produce results? is there a 'WHERE' clause in your SQL?
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Viewing source code of web site

Post by Todlerone »

Bal wrote:Uh.. I've never even heard of such a problem. What are you doing to produce results? is there a 'WHERE' clause in your SQL?
http://hmmspl.xcd.ca/index.php
Here's the site. I'm still working on it so there are several missing links. I just posted what I had done up to this moment so that the others teams had something to see. This league had no web site up to this point.

Cheers
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: Viewing source code of web site

Post by Luke »

I dont see any database content in the source... :?
Bal
Forum Newbie
Posts: 9
Joined: Tue May 27, 2008 11:45 am

Re: Viewing source code of web site

Post by Bal »

I don't see anything in the 'view source' option either (though I'm using Safari)

Perhaps what you mean (and I'm not being mean) is the actual code? In which case you have to have DB info in, though that wouldn't be easily accessible by the casual observer.
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Viewing source code of web site

Post by Todlerone »

The contents of my <div id="schedule"> are in tabular form populated from my database. I often view the source of sites I find interesting and don't see large areas of code that appears to be the output of a database, as is the case in mine. Really, it doesn't concern me I'm just curious if my coding is disfunctional as much as it is functional. Once I get the rest of the site working I want to learn how to improve the code I have written so as to learn proper techniques. I'm just using the initial startup of the site to learn some basics (and hopefullly in time unlearn some of my bad techniques, I em an old(er) dog though).

Cheers and thank for all the responses.
Bal
Forum Newbie
Posts: 9
Joined: Tue May 27, 2008 11:45 am

Re: Viewing source code of web site

Post by Bal »

Oh, I think that's just because the content of your website is almost entirely database information. You would see a lot more non-DB stuff if there were more images, more client side scripting... more.. noise in general.

Just glancing through the source I don't see anything that looks inappropriate or dangerous (though clicking through the 'schedule', 'teams' etc.. results in an error).
Todlerone
Forum Commoner
Posts: 96
Joined: Sun Oct 28, 2007 10:20 pm
Location: Hamilton, Ontario, Canada

Re: Viewing source code of web site

Post by Todlerone »

Thanks. I know those links are going up soon. I'm toying with the idea of using pagenation id's. I already have header and footer includes on this site. Just trying to find some good tutorials.

Cheers and again thank-you.
Post Reply