Jump to content

alert message


bal bal

Recommended Posts

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 

Link to comment
Share on other sites

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...

 

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

<?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?

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.