Jump to content

Critique for a page


dptr1988

Recommended Posts

I'm gathering some tip on PHP degbugging, but I'm more of a source code artist rather then a HTML artist [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] So I was wondering if anybody could review [a href=\"http://dptr1988.mooo.com/php_tips.php\" target=\"_blank\"]this page[/a] and tell me if they have any improvements.

Thanks
Link to comment
Share on other sites

You need to get some HEADINGS and structure your page. Currently its a load of code and comments. You need to put headings and sort the information.

Also - you should make the headings bold, and the code colourised as in a php editor. So your if's and elses etc. should be colour coded.

Its all about making it "READABLE" and easy to find what Im looking for.

Best of Luck,
-steve
Link to comment
Share on other sites

Well nothing changed! its till the same. I look at you style sheet it looks like you've created a class called .header yet in your html your not using!

You should change your body definition to this:
[code]BODY {
    background:#0080C0;
    font-family: arial;
}[/code]

But at the mement the styles you've defined in your stylesheet you're not using!
Link to comment
Share on other sites

the .header and other classes are used in different pages. I don't have a style sheet per page. Here are the styles that I'm using from that style sheet
[code]BODY            { background:#9AC9EF;  font-family:arial; }
A               { text-decoration:none;  color:#004080;  }
A:hover         { text-decoration:underline;  color:blue;}
[/code]

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Well nothing changed! its till the same.[/quote]
Surely you should be able to notice the change in the backgound color from #0080C0 to #9AC9EF! And the changing the font to Arial, and the Contents section.

Thanks
Link to comment
Share on other sites

Umm, much better! Browser was serving your site from my browsers cache. Yeah much better text is more readabale. One thing I dont like is the bottom of your page after the [i]Contributed Debugging Tips[/i] section.

Fort some odd reason there is a huge ugly blank gap aswell which I dont see much point of and your page goes to the right too! You migh want to set a width for your body tag, such as 80%;

So your page content only spans 80% of the screen widith then with the following css:
[code]body {
    background:#0080C0;
    font-family: arial;
    /* center page on screen */
    width: 80%;
    margin: 10px auto;
}[/code]
and add a valid doctype:
[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">[/code]
Your page should be nicely centered on the screen.
Link to comment
Share on other sites

If you don't see any thing after the [i]Contributed Debugging Tips[/i] it is a MySQL database error there. I've been haveing trouble with it. You should see a form where you can add debugging tips and a Get Firefox button after the contributed debugging tips section. Or were you talking about all of the < BR>'s at the end of the document right after the firefox link?

Thank you for all of you help.

Link to comment
Share on other sites

[!--quoteo(post=388218:date=Jun 26 2006, 05:28 PM:name=dptr1988)--][div class=\'quotetop\']QUOTE(dptr1988 @ Jun 26 2006, 05:28 PM) [snapback]388218[/snapback][/div][div class=\'quotemain\'][!--quotec--]
If you don't see any thing ... it is a MySQL database error there. I've been haveing trouble with it.
[/quote]
So, why not use one of the tips to track it down ....
[code]$query = " ... whatever it is ...";
$result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query);[/code]
Link to comment
Share on other sites

No it's not a trouble like that. The connection and the query seem to be fine, it's the while($row = mysql_fetch_assoc($result)) loop that I'm having trouble with. Some times it will print everything it should, other times some of the data in the $row array is corrupted and some times it will print the everything it should but the page won't completely display in firefox even though you can see the full source code when you use 'View Source'. In IE says that it can't display the page when that happens. And it's not just my code, [a href=\"http://www.phpbb.com/\" target=\"_blank\"]phpBB2[/a] was having the same troubles as I described above, when the PHP code was using a lot of querys. I tried long and hard to fix that problem but haven't yet. But this is not the place to be discussing MySQL so I'm not asking for help here. Maybe I'll post on [a href=\"http://www.phpfreaks.com/forums/index.php?showforum=3\" target=\"_blank\"]My SQL Help[/a].
Link to comment
Share on other sites

The < BR>'s are there because the 'Add Your Own Tips' section does not fill up the whole page and I wanted the php_tips.php#addyours link to take you to the very bottom. If I didn't have the < BR>'s and somebody clicked the php_tips.php#addyours link the header would be somewhere in the middle of the page rather then the top where I wanted it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.