[size=14pt]Greetings,
A short introduction before i ask a few questions,
I am a IT Student in Singapore, have learn python, Java and now php/html codes.
And no, i am not an expert on all these… its too much of stress for me to take all in a go.
Currently i am doing a simple project for my school (Final Year Project), a team of 3 students (Including me), it is really VERY VERY VERY Important, and i am stuck. Guess what i cant even approach help to my teachers, and i have no choice left.
I have tried to self learn a few codes. Manage to get some working and some not. I’ll make it short summary about what are the requirements of this project.
Project Category: Online Helpdesk
Included:
[ul][li]Showing Ad-Hoc messages
FAQ Links
Login/Register (I need to create a Master Data for registering as to identify a Student or Staff)
Create/Submit Tickets
Status of Tickets [/li]
[li][/li][/ul]
And more.
There is more but however right now i am stuck at Registration
This code below is just a simple Register form.
[php]
Order Form
* - Mandatory fields
<label for='idName'>Name</label><font color='red'>*</font>: <input name="fullName" type="text" id='idName' required placeholder='Full Name' /><br/><br/>
<label for='id'> ID</label><font color='red'>*will be use for login</font>: <input type='text' name='id' id='id' placeholder='e.g: 13012345' size='8' maxlength='8' /><br/><br/>
<input name="category" type="radio" value="1" hidden/> <!-- Student -->
<input name="category" type="radio" value="2" hidden/> <!-- Staff -->
<label for='idEmail' >Email: </label><input name="Email" type="Email" id='idEmail' size="40" placeholder='eg: [email protected]' /><br/><br/>
<label for='idNumb' > Contact Number</label> <font color='red'>*</font>: <input name='phone' type='number' id='idNumb' required placeholder='e.g: 12345678' size='8' maxlength='8' value='number' />
<br/><br/>
<label for='password' >Password<font color='red'>*</font>: </label><input name="password" type="password" id='password' maxlength="15" placeholder='Max 15 Character' required /><br/><br/>
<label for='confirmpassword' >Confirm Password<font color='red'>*</font>: </label><input name="confirmpassword" type="password" id='confirmpassword' maxlength="15" placeholder='Double Confirm?' required /><br/><br/>
<input type='submit' value='Submit'> <input type="reset">
</fieldset>[/php]
As you can see my “Category” is hidden, as i need to identify thru “ID”
Student ID starts with = “1xxxxxx”
Staff starts with = “3xxxxx”
I believe i need to do a IF ELSE statement to check my database, but have a look at my doRegister page…
[php]<?php
include “dbFunctions.php”;
$fullname = $_POST[‘fullName’];
$login_id = $_POST[‘id’];
$category = $_POST[‘category’];
$email = $_POST[‘Email’];
$phonenumber = $_POST[‘phone’];
$password = $_POST[‘password’];
$confirmpassword = $_POST[‘confirmpassword’];
$role = “”;
if ($login_id = “3%%”)
if ($category == “1”) {
$role = “Student”;
} else {
$role = “Staff”;
}
if ($fullname == “” or $email == “” or $login_id == “”
or $phonenumber == “” or $password == “” or $confirmpassword == “” or $category == “”) {
$message = "There was an empty field, please refill the form.
Back
";
} else {
$queryCheck = “SELECT * FROM user WHERE login_id=’$login_id’”;
//echo $query_check;
$resultCheck = mysqli_query($link, $queryCheck) or die(mysqli_error($link));
if ($password == $confirmpassword){
//All good. Carry On.
}else{
echo "Sorry your passwords do not match. <br /> <a href='Register.php'>Back</a> <br/>";
exit();
}
}
if(mysqli_num_rows($resultCheck) == 1){
$message = "ID already exist";
$message .= "<br/> Please <a href='Register.php'>register</a> again";
}else{
$queryInsert = "INSERT INTO `user`
(`name`, `password`, `login_id`, `email_adress`, `phone_number`, `Role_role id`)
VALUES
( '$fullname', '$password', '$login_id', '$email', '$phonenumber', '$category')";
$resultInsert = mysqli_query($link, $queryInsert) or die(mysqli_error($link));
$message = "Hi" . " " . strtolower($fullname) . " , you has been registered as" . " " . $role;
$message .= "<br/> You can now <a href='index.php'>login</a>";
mysqli_close($link);
}
?>[/php]
This was what i did to get it connected and insert in my localhost Database.
As i mention a Master_Data i need to create in my database, filling it up with existing Sample of Student ID, and Staff ID.
Under TABLE User will be empty, and doRegister.php will be inserted in USER.
I create a ROLE TABLE and categorize Student = 1, Staff = 2
NOW I am stuck here, as for my Register page, when someone enters a ID, it needs to be checked in my MASTER_DATA to check if exist DURING the register page.
THEN so can proceed the register page.
This project of mine it is really very simple… but i am really too stress and getting desperate asking for help.
I hope someone can be nice enough to support me, maybe thru skype or something.
Need help badly![/size]
NOTE: Below here is the FULL Summary of my project requirement. Its really very very very simple. It is not necessary to read it all but i put here anyways.
System home page will be able to provide the follow features: 1) Support posting of ad-hoc messages from the helpdesk team (e.g. production service interruptions) 2) FAQ link for user to search by topic or system (e.g. LEO, OASIS) 3) Start point for user to submit or view the ticketsStaff and Students:
All users are required to register with the system, and their registration will be validated according to the Master table in RP to identify the “Staff and Students”
Each user can create and submit an enquiry form to IT helpdesk for assignment and resolution.
There should be individual sections in each ticket for the requestor and IT helpdesk staff to update. The name of the user and date/time should be recorded for any new comment made. All previous comments cannot be maintained or deleted.
The problem Ticket form will contain the following details for requester: Ticket No (system auto generation), Created on, Status (submit/ pending/closed), requester information (name, staff/student, school, contact no), problem description (Subject, System name, problem description)
Once the problem ticket is submitted, email notification will be sent to the respective support staffs according to system name in the ticket.
Helpdesk Administrator:
- Admin is to maintain the support staff list for all the IT system. For example, System Name 1st Support 2nd Support 3rd Support LEO Simon Smith Andy Wilts Andrew Cummings OASIS Frank Black Lim Eds Wilson Williams
- System auto assign the problem tickets to the available staff according to the above support matrix and leave calendar. E.g. If 1st support is on leave, then system will check the 2nd support’s availability.
- Ad-hoc message and FAQ list can be maintained in the system home page
- Admin is able to view all the problem ticket and their status.
IT Helpdesk Staff:
IT staff need to create and update their leave information in the shared calendar for ticket auto assignment.
IT Support staff is required to login the system and change the ticket status from “Submit” to “Pending” after he or she receives the email.
IT Support staff to change the ticket status to “closed” once resolution is filled up
No update is allowed once ticket is closed.
Deliverables: A working application as described in Project Description