bal bal Posted February 18, 2009 Share Posted February 18, 2009 Hi this is Sha. I don't know how to start. I am going to design a database where there will be two tables, one for log in details and another one will be for student marks. There should be a standard say 40 marks. If any student gets less than 40, and everytime when he/she log in to the system, it will show him/her a message say for example "do more practice" until he/she reach the standard. I have got no clue how to start. Can anyone please help me to how to start? I am sorry if I post this in the wrong forum. Thanks... Sha Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/ Share on other sites More sharing options...
allworknoplay Posted February 18, 2009 Share Posted February 18, 2009 Hi this is Sha. I don't know how to start. I am going to design a database where there will be two tables, one for log in details and another one will be for student marks. There should be a standard say 40 marks. If any student gets less than 40, and everytime when he/she log in to the system, it will show him/her a message say for example "do more practice" until he/she reach the standard. I have got no clue how to start. Can anyone please help me to how to start? I am sorry if I post this in the wrong forum. Thanks... Sha Ummm this belongs in some SQL DB forum... Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764761 Share on other sites More sharing options...
trq Posted February 18, 2009 Share Posted February 18, 2009 Hi this is Sha. I don't know how to start. I am going to design a database where there will be two tables, one for log in details and another one will be for student marks. There should be a standard say 40 marks. If any student gets less than 40, and everytime when he/she log in to the system, it will show him/her a message say for example "do more practice" until he/she reach the standard. I have got no clue how to start. Can anyone please help me to how to start? I am sorry if I post this in the wrong forum. Thanks... Sha Ummm this belongs in some SQL DB forum... No it doesn't, thats where I moved it from. @bal bal: What code do you have already? Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764764 Share on other sites More sharing options...
allworknoplay Posted February 18, 2009 Share Posted February 18, 2009 No it doesn't, thats where I moved it from. @bal bal: What code do you have already? LOL....my spider senses tell me has no PHP code... Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764771 Share on other sites More sharing options...
Chevy Posted February 18, 2009 Share Posted February 18, 2009 <?php if (isset($_COOKIE['login']) && basename($_SERVER['PHP_SELF']) == "index.php"){ $mark = $database_query->marks; if ($mark <= 40){ echo 'Yikes! It looks like you need to work a little harder to bring up your grade!'; } } ?> Something like that is what you mean? Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764772 Share on other sites More sharing options...
gizmola Posted February 18, 2009 Share Posted February 18, 2009 This is a pretty simple set of requirements. You need a routine that queries the database and determines whether they have met the criteria or not. Since you brought it up --- what database structure have you arrived at for storing the "marks" By marks, I assume you mean grades? So the idea is: Student Table --- Where 1 student can have many Grades? Usually, there would also be a course table in there, so you could have the same student take many courses, but maybe you don't need that. Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764776 Share on other sites More sharing options...
niranjnn01 Posted February 18, 2009 Share Posted February 18, 2009 Hello, if u r a complete newbie to coding, then i hope this will help a lill make a table called 'Login' with fields id, username password. then a table called 'Grades' made, with fields like id[set it as foreign key to the field 'id' of table 'Login'], grade1 grade2 totalgrade when a person tries to login, a php code will check if the username and password entered matches any entry of 'Login' table. if it matches, then get the corresponding 'id', and continue inside the website. otherwise, ask for correct login information again.. now, as soon as thy login, run a php code, which will run a query to see if the value of 'totalgrade' field of table 'Login', corresponding to the id you got in the last step, is above 40. if it is not, then give an alert message... this is very basic stuff..just to get u sarted. you will have to learn abt. html [for login form] mysql [for making tables, populating and retrieving data from it.] php [to make the whole thing work] and lill javascript[to give alert message.. you can do without it too.] Regards Rakesh Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764806 Share on other sites More sharing options...
allworknoplay Posted February 18, 2009 Share Posted February 18, 2009 haha you guys are crazy!! The original poster hasn't even come back to this thread and you guys have all these ideas and code for him...LOL.. Props to you guys!!! Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764832 Share on other sites More sharing options...
bal bal Posted February 18, 2009 Author Share Posted February 18, 2009 thanks all of you guys, I will start the way you guys told me to do. you all are really helpful. I keep posting the progress of it. thanks once again Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764855 Share on other sites More sharing options...
allworknoplay Posted February 18, 2009 Share Posted February 18, 2009 thanks all of you guys, I will start the way you guys told me to do. you all are really helpful. I keep posting the progress of it. thanks once again Hey where do you think you are going? Where's the code?? Just kidding....good luck... Quote Link to comment https://forums.phpfreaks.com/topic/145671-alert-message/#findComment-764858 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.