Jump to content

Archived

This topic is now archived and is closed to further replies.

MoFish

Opinions On My Website

Recommended Posts

hello all. I have been set an assignment for university to create a dynamic webpage with the following functions:

* user registration / login
* a dynamic image gallery
* a discussion forum

This is due in on Friday. I was really just after some comments / opinions. It may be a little ropey in places, as it is the first time I have created any dynamic website. Any feedback or errors would be greatly appriciated.

Thanks Alot, MoFish

[b][a href=\"http://mo.dotgeek.org/UNISITE/\" target=\"_blank\"]LINK TO MY SITE HERE[/a][/b]

Share this post


Link to post
Share on other sites
It looks good.

User registration is broken. It keeps saying that "username is already chosen".

It serves all your requirements, and quite well at that.

Im wondering did you use SMF forums or another system.

If you setup a demo acc. I'll do some more testing/debugging ;-)

EDIT: on the login and register pages, the vertical line between content and nav moves to the middle of your website.

-steve

Share this post


Link to post
Share on other sites
DOH, something has gone wrong somewhere with the registration section.

[code]
        //my second check, is to ensure we dont have 2 usernames the same.
        //assign a second query. this query will select all the usernames
        //from the database where it is equals to the one you are wanting to
        //register with.
        $sql = mysql_query("SELECT * FROM `user_details` WHERE name='$name'");
        $result = mysql_num_rows($sql);
        
        //if the result does not equal 0, then it means records have been
        //found with the same username. so lets display then assign an error message to the variables
                //which will be used later for printing to page
        if($result !=="0"){
            echo "<div class='error-style'>The username you have chosen already exists!<div>";
                exit;
        
        //if the username is valid and avaliable, then lets proceed.
        } else {
[/code]

as for the SMF forums, im not sure what exactly they are, but im guessing that may be some sort of free forum script? If so the answer is no, I coded the forum myself. I'll set up an account as soon as I figure out whats going wrong with this registration section. Thanks again. MoFish

Share this post


Link to post
Share on other sites
This bit is wrong ->

if($result !=="0"){


You done very well to code the entire website yourself. It looks good.

-steve

Share this post


Link to post
Share on other sites
Ah silly mistake! doh! should be working now. I have setup an account if you would like to test anything out. I did notice that problem with the verticle line, but dont have a scooby how its doing that. On firefox it appears work fine. Soon as I open internet explorer, its a whole new story. The navigation section is using a fixed width of 150px, so im not sure really why its moving about.

I really should try to fix that before getting graded.

username: Demo
password: Demo

Share this post


Link to post
Share on other sites
Humm.... definately a couple of bugs floating around.

Any message posted with a single quote, e.g. brian o'connell
will not work.

That vertical line which you dont have a scooby about - well its worse when going through the forums - buuugggy.

Ah HEY :( -- FAIL

The user can upload a shagging php file ->

[a href=\"http://mo.dotgeek.org/UNISITE/gallery/test.php\" target=\"_blank\"]http://mo.dotgeek.org/UNISITE/gallery/test.php[/a]

come on. You need to do a little more debugging and coding.

I'll leave it at that. Will check it later

-steve

Share this post


Link to post
Share on other sites
doh. guess i failed, lol. i'll try correct some of these problems, but i doubt I will get that verticle line thing fixed, im not sure why its happening in explorer and not in firefox. thanks for testing :) i'll try to sort the upload file type thing out now.

Share this post


Link to post
Share on other sites
I'm not sure really on the code of checking files on submission, but would it be something like the following.

[code]
//get the type of file of the file user is uploading
$type = $_FILES['image']['type'];

//if the type does not squals jpg then display an error message
if (!$type == "jpg" ) {
    echo "You can only upload jpg's";

//else the file is a jpg, so lets continue.
} else {
[/code]

Wish I had learned this language a couple years before now. Starting to enjoy it.

Share this post


Link to post
Share on other sites
[!--quoteo(post=368463:date=Apr 25 2006, 03:38 PM:name=MoFish)--][div class=\'quotetop\']QUOTE(MoFish @ Apr 25 2006, 03:38 PM) [snapback]368463[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm not sure really on the code of checking files on submission, but would it be something like the following.

[code]
//get the type of file of the file user is uploading
$type = $_FILES['image']['type'];

//if the type does not squals jpg then display an error message
if (!$type == "jpg" ) {
    echo "You can only upload jpg's";

//else the file is a jpg, so lets continue.
} else {
[/code]

Wish I had learned this language a couple years before now. Starting to enjoy it.
[/quote]

I think you should be more thorough and use ->
[a href=\"http://ie2.php.net/manual/en/function.mime-content-type.php\" target=\"_blank\"]http://ie2.php.net/manual/en/function.mime-content-type.php[/a]

Im not sure - but a person can rename a php file to be jpg - and then upload it, and the script may/maynot run, depending on how its called - I think anyways.
You have to Validate Validate and Validate *any* user input.

-steve

Share this post


Link to post
Share on other sites

×

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.