Page 1 of 1

Echo ticket ID rather than tracking ID on submit

Posted: Fri Nov 20, 2009 9:23 am
by tomdawson
Script URL: (internal)
Version of script: 2.1
Hosting company: IIS, internal
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: id, echo, submit

Write your message below:

Hi there.

Yet another note of thanks for your fantastic script :)

We have tweaked Hesk to use job numbers (table IDs) in place of tracking IDs (just by printing ID in emails and stuff) as we use Hesk in a school - teachers weren't keen on remembering "DDP7JL8N4N" and stuff!

Upon ticket submit, the user is presented with "submitted, your tracking ID is DDP7JL8N4N" for example, is it possible to swap the trackingID for (table)ID so they are presented with a nice job number?

Been playing around but have not managed to get anywhere :(

Thanks in anticipation :)

Tom.

Posted: Fri Nov 20, 2009 3:59 pm
by Klemen
You'll need to provide more info and some examples, as I have no idea how your new system is setup: what variables you use, where is the ID stored, what you tried so far, ...

Posted: Thu Dec 03, 2009 11:04 am
by tomdawson
Hi Klemen,

Thanks for the reply. We haven't modified the actual database, tickets are still technically accessed via Tracking IDs, we've just added in

Code: Select all

$ticket[id]
as well as

Code: Select all

$ticket[trackid]
in the admin main page for example. Then modified the search functions to allow searching by ID.

I'd just like the new ticket's ID to be displayed once a ticket has been submitted as well as the Tracking ID.

Any suggestions?

Cheers,
Tom.

Posted: Thu Dec 03, 2009 2:46 pm
by Klemen
Aha, I understand now. You will need to get the last inserted ID from the database and post it. Edit submit_ticket.php and add something like

Code: Select all

$myid = mysql_insert_id($hesk_db_link);
just above

Code: Select all

/* Get e-mail message for customer */
then you can use $myid to display the ID of the ticket (in the HTML code below and/or in the emails).