Script URL:http://ruxchng.rutgers.edu/tickets/
Version of script:2.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
Hello, I have been trying to edit the new ticket reply feature to include the category name that the customer selected. I added a SELECT statement to get the category name given its id. It failed as it returns an unexpected value.
I added the following SELECT statement under the submit_ticket.php file:
$qry = "SELECT `name` FROM `".$hesk_settings['db_pfix']."categories` WHERE `id`='".$category."'";
$catname = hesk_dbQuery($qry);
$message=str_replace('%%CATEGORY%%',$catname,$message);
When the customer receives the email they get the following message:
Dear eeee,
Your Resource id #8 support ticket "Testing categories" has been submitted.
We try to reply to all tickets as soon as possible, usually within 24 hours.
Instead of saying "Resource id # 8" it should be saying the selected category name ("Dining Services Computer Support")
This is the contents of the mysql table:
mysql> SELECT * FROM hesk_categories;
+----+----------------------------------+-----------+
| id | name | cat_order |
+----+----------------------------------+-----------+
| 1 | Dining Services Computer Support | 10 |
| 10 | RU Express / Meal Plan | 20 |
| 6 | Other | 50 |
| 11 | Dining Services Facilities | 30 |
| 12 | Sanitarian | 40 |
+----+----------------------------------+-----------+
I also displayed the SELECT statement:
Your SELECT `name` FROM `hesk_categories` WHERE `id`='1' support ticket "Testing categories" has been submitted.
[/quote]
Customer reply email trouble
Moderator: mkoch227
After the hesk_dbQuery you need to fetch results for example using hesk_dbFetchAssoc (or with original functions - after mysql_query() you need to use mysql_fetch_assoc() to get the result).
Change to
http://www.google.com/search?hl=en&q=php+mysql+tutorial
Change
Code: Select all
$catname = hesk_dbQuery($qry);
Code: Select all
$myres = hesk_dbQuery($qry);
$mytmp = hesk_dbFetchAssoc($myres);
$catname = $mytmp['name'];
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools