MoFish Posted April 25, 2006 Share Posted April 25, 2006 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 forumThis 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] Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/ Share on other sites More sharing options...
steviewdr Posted April 25, 2006 Share Posted April 25, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30534 Share on other sites More sharing options...
MoFish Posted April 25, 2006 Author Share Posted April 25, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30539 Share on other sites More sharing options...
steviewdr Posted April 25, 2006 Share Posted April 25, 2006 This bit is wrong ->if($result !=="0"){You done very well to code the entire website yourself. It looks good.-steve Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30544 Share on other sites More sharing options...
MoFish Posted April 25, 2006 Author Share Posted April 25, 2006 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: Demopassword: Demo Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30551 Share on other sites More sharing options...
steviewdr Posted April 25, 2006 Share Posted April 25, 2006 Humm.... definately a couple of bugs floating around.Any message posted with a single quote, e.g. brian o'connellwill not work.That vertical line which you dont have a scooby about - well its worse when going through the forums - buuugggy.Ah HEY :( -- FAILThe 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 Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30558 Share on other sites More sharing options...
MoFish Posted April 25, 2006 Author Share Posted April 25, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30561 Share on other sites More sharing options...
MoFish Posted April 25, 2006 Author Share Posted April 25, 2006 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 Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30572 Share on other sites More sharing options...
cmgmyr Posted April 25, 2006 Share Posted April 25, 2006 Looks good to me...good job! Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30580 Share on other sites More sharing options...
steviewdr Posted April 25, 2006 Share Posted April 25, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/8361-opinions-on-my-website/#findComment-30588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.