keskin Posted April 30, 2007 Share Posted April 30, 2007 I have a web site I need to do, so I need help on finalizig it. It's about this fishing sports club, and the members want to be able to put in their personal stats by themselves, not by me. So, the page needs the login/register members part, which I never done before, and also, it needs a somekind of stat tracking. ie one member logs in, and inputs 5 fish another one logs in, inputs 3 and on front page there is a ticker that shows current count, 8 and after two days, on another ticker it shows average 4 per day So, any hel with this I would be very grateful Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/ Share on other sites More sharing options...
monk.e.boy Posted April 30, 2007 Share Posted April 30, 2007 This is an extremely broad request, bordering one 'please code everything for me from my 2 lines of specification'. Why not try some simple log in code and post it here and we'll help you. One step at a time. BTW google is your friend, there are lots of good tutorials out there for login stuff. monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-241610 Share on other sites More sharing options...
keskin Posted April 30, 2007 Author Share Posted April 30, 2007 how can i search for tutorials for making a register/login website, controlling member access etc. but im more concerned about making a stat page... could you give me some directions to it... Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-241624 Share on other sites More sharing options...
monk.e.boy Posted April 30, 2007 Share Posted April 30, 2007 Well, do the login bit first. For the stats, you need a database, every time a member enters a fish, you also store the date and time. Then on the front page you count all the fish caught this week (as an example) and display this as an average. Without some more data and an example equation I am a bit stuck. Please post some examples: Jeff catches 77 Fish, each of 5lb on 12/12/2007, on the font page I want XXXXXX displayed. monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-241645 Share on other sites More sharing options...
keskin Posted April 30, 2007 Author Share Posted April 30, 2007 OK I'll do some search on login part of the story... As for the stats, I really would like to keep it as basic as possible, because we all know that we can go infinite on statistical combinations... So, I would basically break it down to this; Let's say I got 3 fishermen registered. There would be 3 fields. 1. - Location (of the individual fisherman) 2. - Fish category (shellfish, squid, octopus etc.) 3. - Fish count On the front page, I would like to show mainly total amount of fish, regardless of other categories like location and category. Also, it would be nice to have some variations on the front page like Daily Average and Top Fisherman of the Week and/or of the Month. Also, it would be cool if I could make a table with listing which I can sort by criteria such as sorty by location, sorty by category, sort by fishermen... I will try to make this page, it will take some effort but I think that it is possible... Hope that I explained it good enough so I can get some quality help Thanks Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-241672 Share on other sites More sharing options...
monk.e.boy Posted April 30, 2007 Share Posted April 30, 2007 Reply to this thread when you are ready to code it. Everything you posted is easy to do, so don't worry about it yet. Any of the members here will be able to advise and help you. monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-241674 Share on other sites More sharing options...
keskin Posted May 1, 2007 Author Share Posted May 1, 2007 ok thanks, hope someone helps me out Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-242047 Share on other sites More sharing options...
john010117 Posted May 1, 2007 Share Posted May 1, 2007 ok thanks, hope someone helps me out ...after you've posted some code. There are good tuts here on phpfreaks.com. Check 'em out. Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-242066 Share on other sites More sharing options...
monk.e.boy Posted May 1, 2007 Share Posted May 1, 2007 There would be 3 fields. 1. - Location (of the individual fisherman) Hook this up to google maps. Link in some fish adverts. Hook into a Fish picture database. Local fishing news. Local shops selling fishing gear. Local competitions. Editorials on how to fish. Christmas fishing present ideas. Adverts = you're starting to make some money to fund the website. Hey, this is starting to be a nice little project. GET THE LOGIN PAGES FINISHED!!! ;) :D monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-242139 Share on other sites More sharing options...
keskin Posted May 2, 2007 Author Share Posted May 2, 2007 Login DONE! Well, the test version only... I really didn't do much but follow the steps of one guy on some website... The login/out works, it has remember feature, and it works. When I close IE, and then go to localhost page again, I stay logged in. When I logout, I logout While I'm figuring a way where to put this on my website, we could start on making that database... Where should I start? I work with xampp and have phpMyadmin of course... Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-243685 Share on other sites More sharing options...
The Little Guy Posted May 2, 2007 Share Posted May 2, 2007 1. http://snippets.tzfiles.com/snippet.php?id=16 2. http://snippets.tzfiles.com/snippet.php?id=4 Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-243686 Share on other sites More sharing options...
keskin Posted May 2, 2007 Author Share Posted May 2, 2007 I done the login part... How to include that in my HTML page? Where can I put the code, and is it possible to insert it in HTML with Dreamweavers "Insert PHP objects" menu? My login script consist of database.php, login.php, logout.php, register.php and main.php. So, how to set these files to apropriate html pages (or can I convert my HTML pages to php?) Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-243742 Share on other sites More sharing options...
monk.e.boy Posted May 3, 2007 Share Posted May 3, 2007 <html> <head> </head> <body> <?php echo 'hello'; ?> </body> </html> Like that. So maybe dreamweaver will allow you to do this? I'm not sure. Next is getting a connection to your database up and running. Are you using MySQL? Have you tested your login script on your server? monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-244118 Share on other sites More sharing options...
keskin Posted May 3, 2007 Author Share Posted May 3, 2007 Progress! I succesfully made the login/logout script work. I even adjuted it so it looks just like my website theme, so it's fully implemendted, I guess... The only thing that I need take care of is the status bar or whatever is it called, a line that will show "Welcome User, you are now logged in. Logut here" on the top of every page on my site. Or that isn't neccessary? The login script has a "remember me" feature and it works. The phpMyadmin shows 16 users in "users" table of my database, so that's also working, since I've tried with that many logins So, to put it briefly; 1. Can I put sort of breadcrumb bar on top of the site with "Login / you are logged in / Logout" feature? 2. After I put php parts in my website pages, the containter went to left, and now all the pages that contain scripts (login page, register page) are aligned to left...although they have the same exact code as the ones without php and those show centered both in IE and MF Well, I hope I make some progress... Hope I'll start that database soon Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-244422 Share on other sites More sharing options...
keskin Posted May 3, 2007 Author Share Posted May 3, 2007 Problem 2 solved Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-244465 Share on other sites More sharing options...
monk.e.boy Posted May 4, 2007 Share Posted May 4, 2007 Try to add the login/logout bread crumb your self, if you have any problems, post your code here. You need to add a line similar to this: <?php if( $logged_in ) echo '<a href="logout.php">log out</a>'; else echo 'Hello guest, <a href="login.php">log in</a>'; ?> monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-245200 Share on other sites More sharing options...
keskin Posted May 4, 2007 Author Share Posted May 4, 2007 Done LOL Now for the hard part - the database. OK guys, where do I start. I was thinking about this later, I need a each member page to make, with "stats" displayed etc... Where should i begin? Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-245409 Share on other sites More sharing options...
monk.e.boy Posted May 4, 2007 Share Posted May 4, 2007 You need a table for each item you are thinking of saving data about. So tables will be something like: members (id,name,email,etc) fish (id,name,fk_fish_type) fish_type (id,type) caught (fk_fish,fk_member,datetime,weight) fk_ means a foreign key to a table. It links the tables together. So table caught links the weight and date to a member and to a fish. So JOINing these you get: John,marlin,5kg,12-12-2007 I think fish type may be too much. I was thinking that you may need fresh water and sea fish. But ignore this if it is too much. So you need to think of some simple tables like the above and create them in MySQL. Don't worry if you make mistakes, we all do. MySQL is very nice and will let you add/delete/change tables at any time. Check out the database tutorials on this site. Keep asking questions monk.e.boy Quote Link to comment https://forums.phpfreaks.com/topic/49305-stat-count-database-help-noob/#findComment-245462 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.