Jump to content

SQL+PHP URGENT HELP PLEASE


01hanstu

Recommended Posts

I have a support system and i am trying to get it so that when the user logins in they can access there past calls. I have been able to do this to some digree, but now i want to be able to use the information and basically expand on the information that was there. i.e. It normally shows basic details like name, date logged and call ref number. now i need it to be able to open it and display additional information like the work undertaken and son on

 

Help is very appreciated

Excuse the grammar

Stuart ???

Link to comment
Share on other sites

HI, my intranet is running and we are looking to update the existing system with a few features. Every user on the system can login and make whats called a "Support Request" With that we take information and have it put into a mysql database and also an email.

 

The current script we use is below showing the information for that specific user.

 

<?

include ('nav.php'); //Our Navigation System

include ('getlogon.php'); //Username authentication Through IIS + Domain

include ('connect.php'); //Connection to MYSQL Database.

mysql_select_db($database_lmconnect) or die( "Unable to select database");

  $query = "SELECT * FROM jobs WHERE '$logon_name' = name and '0' = isopen";

$result = (mysql_query($query));

$num = mysql_num_rows($result);

 

?>

 

THIS IS THE BIT THAT ACTUALLY GETS THE LIST OF CALLS THEY LOGGED ON THE SYSTEM.

<? $i=0;

while ($i < $num) {

if ($i == 0){print "<span class=\"datehead\">Your Old Calls logged with us:</span><br /> ";}

$jobnumber=mysql_result($result,$i,"jobnumber");

$machine=mysql_result($result,$i,"machine");

$network=mysql_result($result,$i,"network");

$date=mysql_result($result,$i,"date");

$description=mysql_result($result,$i,"description");

$today = time();

$date = strtotime($date);

$difference = $today - $date;

$action=mysql_result($result,$i,"actiontaken");

    print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber &nbsp&nbsp&nbsp ";

print "<span class=\"darkgreen\"> Issue with:</span> $machine &nbsp&nbsp ";

print "<span class=\"darkgreen\"> Solution: </span> $action <br />&nbsp&nbsp <br /><br />";

$i++;

}

mysql_close();?>

 

What i need to know is how i can carry over the jobnumber onto a new page and it show the details of the call, all i seem to get is an error about the call number

 

Hope this helps

Stuart

Link to comment
Share on other sites

change

    print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber &nbsp&nbsp&nbsp ";

  print "<span class=\"darkgreen\"> Issue with:</span> $machine &nbsp&nbsp ";

  print "<span class=\"darkgreen\"> Solution: </span> $action <br />&nbsp&nbsp <br /><br />";

 

to

 

    print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber &nbsp&nbsp&nbsp ";

  print "<span class=\"darkgreen\"> Issue with:</span> $machine &nbsp&nbsp ";

  print "<span class=\"darkgreen\"> Solution: </span> $action <br />&nbsp&nbsp <br /><br />";

  print "<a href='expandInfo.php?jid={$jobnumber}' class=\"darkgreen\">Expand Info</a><br />";

 

then create a file called

 

expandInfo.php

 

and use $_GET['jid'] as the job number to form your next query..

 

Russell

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.