Jump to content

Not quite sure what this particular issue is called - (submitting forms i think)


taz321

Recommended Posts

Hi

 

I am developing an helpdesk system, a user would fill in an blank form and submit to a work queue (workqueue.php)

 

An analyst would see the list of queries and open one of them, he would then give a query a status, either resolved, unresolved or pending.

 

What im wanting is that the analyst to give a query a status level but once submitted that query would then leave the work queue and join another php page called resolved.php.

 

I hope this is straight forward, this is a major bit of my system and am not understanding how to do it.

 

Any help would be appreciated

 

Thanks

 

 

 

 

 

Link to comment
Share on other sites

insert the question into a db with the following columns (this is onyl a rough draft)

 

id    question    read  status  date 

#    blah balh    0        0        date

 

0 on read means "unread" and status 0 is "not unclassified yet"

 

and on work queue...

"SELECT * FROM `table` WHERE `read`='0' "

 

and display all that..

then for updating...

"UPDATE `table` SET `read`='1' AND `status`='{$status}' "

 

then on the resolved page...

 

"SELECT * FROM `table` WHERE `status`='what ever your resolved number will be' "

 

Link to comment
Share on other sites

I have form checking code below, just need the code which would send a particular query which has been given as status level to be submitted to php pages - resolved.php, unresolved.php & pending.php

 

 

<?php
require "connect.php";
$formID = $_GET['formID'];
$issuetitle = $_GET['issuetitle'];
$datesubmitted = $_GET['datesubmitted'];
$timesubmitted = $_GET['timesubmitted'];
$systemaffected = $_GET['systemaffected'];
$prioritylevel = $_GET['prioritylevel'];
$issuedetails = $_GET['issuedetails'];
$supportcomments = $_GET['supportcomments'];
$clientFname = $_GET['clientFname'];
$clientSurname = $_GET['clientSurname'];
$teamname = $_GET['teamname'];
$clientID = $_GET['clientID'];
$status = $_GET['status'];
$dateactioned = $_GET['dateactioned'];
$timeactioned = $_GET['timeactioned'];
$analystFname = $_GET['analystFname'];
$analystSname = $_GET['analystSname'];

if($prioritylevel == "Please Select") 
{

	$message1 = "Please select the issue topic";
	header("Location: analystformedit.php?message1=$message1");
	exit();
}

if($status == "Please Select") 
{
	$message2 = "Please enter the system affected";
	header("Location: analystformedit.php?message2=$message2");
	exit();
}

if($supportcomments == "") 
{
	$message3 = "Please enter details of the problem";
	header("Location: analystformedit.php?message3=$message3");
	exit();
}

$query = "update form set issuetitle ='".$issuetitle."', datesubmitted ='".$datesubmitted."', timesubmitted ='".$timesubmitted."', systemaffected ='".	 										$systemaffected."', prioritylevel ='".$prioritylevel."', issuedetails ='".$issuedetails."', supportcomments ='".$supportcomments."', clientFname ='".$clientFname."', 	clientSurname ='".$clientSurname."', teamname ='".$teamname."', clientID ='".$clientID."', status ='".$status."', dateactioned = '".$dateactioned."', timeactioned = '".			$timeactioned."', analystFname = '".$analystFname."', analystSname = '".$analystSname."' where formID =".$formID;

   $result = mysql_query($query, $connection) or die ("Unable to perform query<br>$query");
header("Location: enquiryscreen.php?var=formID");
exit();

?>

 

 

Link to comment
Share on other sites

don't use GET...

 

insert it into a databse, and whoever is answering the question can draw it from the database...

 

to sort the 3 statuses, simply use 1, 2, 3

 

for resolved,

"SELECT * FROM `table` WHERE `status`='1' "

for unsolved

"SELECT * FROM `table` WHERE `status`='2' "

for pending,

"SELECT * FROM `table` WHERE `status`='3' "

Link to comment
Share on other sites

Sorry i think i may have confused you with the code.

 

I need the GET method there because i am updating the form.

 

Basically when a user fills in a form they would submit it.

Analyst would open that query and give it an status level from a drop down box and then clicks submit (so he is updating the query he opened by inserting extra data for that particular record).

 

From the code you have given me, it looks alot more clearer but once a status level is given and then submitted would the query iv just submitted be removed from the work queue as it doesn't need to be there anymore ?

Link to comment
Share on other sites

there is no "actual" work queue

 

People submit stuff, it goes in a table, it is stored on the hard-drive. Its not temporary data (unless you do a cron job, which you'll probably want to as your site grows). Then, on the work queue, you are uploading that data. The way you would do it by a "first submitted, first answered" would be via that date and time you inserted into the same row as the data when it is submited. Then the person puts a status on it, clicks submit, and it is updated.

 

Then on the answer display page, the ones that have  been classified as solved, or a "1", would be displayed.

 

is that what you're trying to do?

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.