Jump to content




Recent Status Updates

  • Photo
      15 Sep
    Error

    Programming is something that I enjoy and want to make a career out of. But, I usually tend to start things and not finish them. Any advice on how I can finish what I start?

    Show comments (2)
  • Photo
      12 Sep
    FacetiousTurtle33

    Just joined. Really enjoy this sight. Excited to become a great programmer, and helper.

    Show comments (3)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

How To Make An Online Examination System Using Php

server client

  • Please log in to reply
10 replies to this topic

#1 neo1691

neo1691

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 53 posts
  • Location:India
  • Programming Language:C, C++, Assembly
  • Learning:Java, C++, PHP, JavaScript, PL/SQL, Assembly

Posted 19 June 2012 - 06:23 AM

I want to make a system, ( an online examination system) in which all the questions-answers etc will be placed on one computer (server) and participants will sit on other computers (client). All the computers will be connected in local area network.

I am yet to learn PHP, and want to use this as an opportunity to learn PHP. I now html and css.

Now i am said that i use sql to manage my database of questions, answers, but i am finding it tough to learn all the commands of mysql.

I am a good C/C++ programmer, so i was thinking to create text files of questions answers using C++ and then using PHP to access those text files to retrieve them. Is such a provision possible in PHP??

Also i want implement it in such a way that all the information of participants are displayed dynamically on the server, like time remaining, number of questions attempted, marks obtained by now etc.

Also i want the result to be displayed on the server.

Is it possible using PHP?? and also please guide me how to achieve the server-client side configuration. I am said that wamp server would be a good option.

Thanks a lot in advance
  • 0

#2 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2,918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 June 2012 - 07:38 AM

It's absolutely possible to do everything you have written. And there is so many alternatives.

I suggest you drop the text file stuff and use a proper database. It's much more easy in the long run and more future-proof, in event of changes. A WAMP server is fine, WAMP is an acronym for Windows Apache MySQL PHP server, and is derived from the more common used LAMP where the L is for Linux instead. there is also MAMP where first M is for Mac.

The other option is to use IIS on a windows server instead, and make the solution in a ASP.NET environment as C#.NET or VB.NET

There are several packages for Windows providing this as one installation even if it actually is several different softwares, for example WAMPServer or XAMPP. I personally prefer XAMPP.

There is may ways of doing this, and you need to investigate what is the best for this solution.
I can see a couple of possible solutions right now:

1) A WAMP server providing web pages for all users and for the "Master"-computer (teacher/examinator/officer), where the users have one webpage and the Master uses another webpage to control and monitor the system. All clents and the master use logins to secure the network

2) A WAMP server providing web pages for all users and an desktop application for the "Master"-computer (teacher/examinator/officer), where the users have one webpage and the Master uses a desktop application to control and monitor the system through SQL. The desktop application can be written in any language using the Win32 or .NET API. The clients use logins to secure them from each other, the master would do with a password protected software.
  • 1

I'm a System developer at Redpill Linpro mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#3 neo1691

neo1691

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 53 posts
  • Location:India
  • Programming Language:C, C++, Assembly
  • Learning:Java, C++, PHP, JavaScript, PL/SQL, Assembly

Posted 19 June 2012 - 07:50 AM

Thanks a lot, that should give me a head start!! I am using head first php and mysql to learn the syntax. And option 1 seems to be easy for me.

Thank again
  • 0

#4 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2,918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 June 2012 - 08:36 AM

As you say you're a good C/C++ programmer and know HTML & CSS, PHP should not be a big deal for you.
PHP syntax is very similar to C/C++, and what you have to learn is some good functions that are made in php for various purposes.
The biggest differences is that variables is not typed and you don't have to (read: you don't) allocate and deallocate memory as PHP uses a garbage collector.
Variables has a leading $ and is not declared at all, unless you're doing object oriented and wants to define members to the class.

There is one big difference between application programming and web programming and that is the stateless mode you're in. you have to know that your program is ran based on a webb call, probably with some information to deal with, and is delivering a HTML page to the browser. you don't know what happended before the page view and don't know what will happen afterwards, so It's not the same kind of program flow as in a normal application.
  • 0

I'm a System developer at Redpill Linpro mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#5 neo1691

neo1691

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 53 posts
  • Location:India
  • Programming Language:C, C++, Assembly
  • Learning:Java, C++, PHP, JavaScript, PL/SQL, Assembly

Posted 19 June 2012 - 08:40 AM

As you say you're a good C/C++ programmer and know HTML & CSS, PHP should not be a big deal for you.
PHP syntax is very similar to C/C++, and what you have to learn is some good functions that are made in php for various purposes.
The biggest differences is that variables is not typed and you don't have to (read: you don't) allocate and deallocate memory as PHP uses a garbage collector.
Variables has a leading $ and is not declared at all, unless you're doing object oriented and wants to define members to the class.

There is one big difference between application programming and web programming and that is the stateless mode you're in. you have to know that your program is ran based on a webb call, probably with some information to deal with, and is delivering a HTML page to the browser. you don't know what happended before the page view and don't know what will happen afterwards, so It's not the same kind of program flow as in a normal application.


Well that does sound interesting, hope i am able to deliver my alpha version in the next week!!
Is there any object oriented approach to PHP??

Thanks a lot for the info again, I will post if i encounter any problems.
  • 0

#6 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2,918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 June 2012 - 09:09 AM

Next week? not a chance at all, I'd say, unless you start doing a prototype in pure HTML and show that as an alpha version.

Yes, PHP is as C++ object oriented if you wish, but you don't need to use it. also, there is no "main" function, as it's a scripting language, so unless you declare functions and classes, everything is executed from top to bottom directly.

You could start learning PHP by looking at w3schools.com who has good tutorials. PHP is extremely good documented language, so learning how to find yourself around the documentation at php.net is highly recommended.

PHP works as an "inline" html language ran on the server, so the php code is replaced by it's output to the user.

The php code can look like this:
<div>This is <?php echo "the program"; ?></div>

and the browser will then get
<div>This is the program</div>
from the server

a printing of 1 to 10 might look like this:
<div>From 1 to 10 in PHP:<br />
<?php
for ($i= 0; $i < 10; $i++) {
  echo $i . "<br />";
}
?></div>

will generate the html:

<div>From 1 to 10 in PHP:<br />
1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />
</div>

and so on...
  • 1

I'm a System developer at Redpill Linpro mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#7 neo1691

neo1691

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 53 posts
  • Location:India
  • Programming Language:C, C++, Assembly
  • Learning:Java, C++, PHP, JavaScript, PL/SQL, Assembly

Posted 19 June 2012 - 09:14 AM

I am starting to get a feel of it, and i see the variables are not typed, which makes things more easier, and since there are variables so i should be able to calculates the marks and other statistics too, only thing is I am unfamiliar of how to do all that dynamically.

Anyways, I have reached here, I should be there too :c-grin:
  • 0

#8 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2,918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 June 2012 - 10:50 AM

You will have to do a database design for your system as well. Which tables do you need and what shall they contain.

I guess some of the tables would be:
test (makes you have several different tests in the database at once, and pick which one to be hold at the time),
question (questions, eventual alternatives and right answers to the questions, and a reference to which test it belongs to),
examination (a test time for a user, would hold user and test to be answered),
answer (the answers given by the user, would probably hold test, question, user and answer),
user (username, password and other needed information)

if your users will be seated at specific seats and you shall track that, you might need to add a table of possible seats and log that to the examination table
  • 1

I'm a System developer at Redpill Linpro mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#9 neo1691

neo1691

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 53 posts
  • Location:India
  • Programming Language:C, C++, Assembly
  • Learning:Java, C++, PHP, JavaScript, PL/SQL, Assembly

Posted 19 June 2012 - 11:38 AM

I am getting those stuff slowly it seems.
And one more thing, is PHP going to be platform oriented?? I use Linux and my college has Windows!
  • 0

#10 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2,918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 19 June 2012 - 12:09 PM

No, PHP is platform independent. there are a few functions that don't work in windows (mainly file/disk-related stuff), but that is also well informed about in the documentation.

um, of course system calls might work different as well as things that accesses hardware like ports and stuff might work different too. But I think none of this should be a problem for you.
  • 0

I'm a System developer at Redpill Linpro mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#11 neo1691

neo1691

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 53 posts
  • Location:India
  • Programming Language:C, C++, Assembly
  • Learning:Java, C++, PHP, JavaScript, PL/SQL, Assembly

Posted 19 June 2012 - 12:43 PM

That should be it!! Thanks a lot!!
  • 0





Also tagged with one or more of these keywords: server, client