j05hr Posted January 30, 2009 Share Posted January 30, 2009 I play football (5 aside) once a week, some people can't turn up every week due to other commitments, I was thinking of making a site so everyone could say whether they can play or not, so sort of like a register. I come here to ask which you think would be the best way to do this is? Just a simple check box to say yes or no or something more complex? Also do you think it would be better if it had a login so they had to login? I'm not very good with PHP so any advice much appreciated. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/143164-making-a-register/ Share on other sites More sharing options...
premiso Posted January 30, 2009 Share Posted January 30, 2009 Login would be ideal, then the yes/no checkbox would be good. You would need a DB, flatfile or MySQL (MySQL is more secure). Look into Login Scripts. Once that is done you simply create a form that asks if they are playing this week. If they put no, then insert a record in the DB the username, date and what they put. If they change their decision that week, you can do an update. If you are not very good at PHP. I would suggest learning SQL first then learn PHP basics, it is not a horribly complicated system, but will take some learning for you do to it. Quote Link to comment https://forums.phpfreaks.com/topic/143164-making-a-register/#findComment-750834 Share on other sites More sharing options...
j05hr Posted January 30, 2009 Author Share Posted January 30, 2009 That's exactly what I mean, I have a login script which can easily be implemented and done a bit of MySQL before so I can make tables. My concern is things like you said about whether they say they can't play and then if they change their mind and can? How would I make an edit button? Also how would I make it be on going for lots of weeks? So say they say yes to this week? How will next week be uploaded? Or just delete the results from the past week? Quote Link to comment https://forums.phpfreaks.com/topic/143164-making-a-register/#findComment-750841 Share on other sites More sharing options...
premiso Posted January 30, 2009 Share Posted January 30, 2009 There are too many answers, honestly. You can have them edit that week, how do you determine a week? You can either just use the date function and determine what week it is, alternatively you can have it all mapped out in MySQL, one table is say "football_games" which has a list of all games, the next table is "whose_playing" which references football_games primary key and the "users" table primary key. Then in here is where you would set if the play is playing. If the user selected yes or no you add an entry with that user id and the game id that are referencing and insert a row stating that. This is really basic MySQL and PHP. You can find a bunch of tutorial on how to pull MySQL out of a DB using PHP, you would use that to display it and create a form etc. That is the logic needed, for any real help you need to try and code it and post when you have a question or issue with the code. Quote Link to comment https://forums.phpfreaks.com/topic/143164-making-a-register/#findComment-750866 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.