Jump to content

passing varibales between pages *noob*


sliperypete

Recommended Posts

Ok here is a problem that I am running into.

I am writing an IT helpdesk ticketing system for school and I am just about done with it. The one thing I cannot figure out for the life of me is how I should do this part. When a technician logs in and sees all of the tickets assigned to him, (they show up in a table with the ticket ID and all of the main info in a table row. I want the tech to be able to click on a "link" which would be the ticket ID and then be able to close the ticket. How do I code it so when he clicks on the ticket ID on the assignment page and the ticket ID is passed to a new page so he can manipulate the ticket.

Thanks in advance

This is what I have so far:

<?php
session_start();
include "level2_check.php";
include("config.php");

$query = 'SELECT * FROM `ticket` WHERE status=1 ORDER BY `ticket_id`';
$results = mysql_query($query);



?>

<html>
<head>
<title>Maintain Ticket's</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<?php include ("admin_header.html") ?>
</head>
<body>
<h3 align="center">All Open Tickets</h3>
<table width="60%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#000000">
  <tr>
  <td width="20%"><div align="center"><strong>Ticket ID</strong></div></td>
  <td width="20%"><div align="center"><strong>User Name</strong></div></td>
  <td width="20%"><div align="center"><strong>Problem Category</strong></div></td>
  <td width="20%"><div align="center"><strong>Problem Description</strong></div></td>
  <td width="20%"><div align="center"><strong>Open Time</strong></div></td>
  </tr>
<?php
while ($row = mysql_fetch_array($results))
{
extract($row);
?>
<tr>
                                      [color=red]The line below is where the link to the new page would be[/color]
  <td width="20%"><div align="center"><strong><a href="admin_viewticket.php><?php echo $ticket_id;?> </strong></div></td>
  <td width="20%"><div align="center"><strong><?php echo $user_name;?></strong></div></td>
  <td width="20%"><div align="center"><strong><?php echo $problem_category;?></strong></div></td>
  <td width="20%"><div align="center"><strong><?php echo $problem_description;?></strong></div></td>
  <td width="20%"><div align="center"><strong><?php echo $open_time;?></strong></div></td>
  </tr>

<?php
echo "<br>";
}
?>
</table>
</body>

</html>
Link to comment
https://forums.phpfreaks.com/topic/27798-passing-varibales-between-pages-noob/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.