Jump to content

Recommended Posts

Hi,

 

I need help with this form submission, i understand for submission is the easiest thing to do in php. But i just can't get this to work.

 

Basically i have a form in which is a question. I have given users choice of 4 answers to this question in a dropdown menu. I just want the form to recognise what answer the user has chosen and put it into a table called support and the column 'category' in it.

 

The code is below. Please can somebody help me here.

 

<?php
session_start();
include_once "includes/db_connect.php";
include_once"includes/functions.php";
logincheck();
$username=$_SESSION['username'];

$spt = $_POST['spt'];
$title=$_POST['title'];
$spt = strip_tags($spt);
$title = strip_tags($title);

$cat=strip_tags($_POST['category']);
   if ($cat == "Bug/Exploits Report"){
   $category="Bug/Exploits Report'";
   }elseif ($cat == "Duplicate Accounts Report"){
   $category="Duplicate Accounts Report";
   }elseif($cat == "Scam Report"){
       $category="Scam Report";
   }elseif($cat == "Scripter/Exploiter Report"){
   $category="Scripter/Exploiter Report";
   }elseif($cat == "Credits Question"){
    $category="Credits Question";
   }elseif($cat == "Other Question"){
       $category="Other Question";
   
if ($_POST['open']){
if ($spt == "" || $title == ""){
echo "Fill in all fields.";
}elseif ($spt != "" || $title != ""){
mysql_query("INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) VALUES ('','$username','0','0','$spt',now(),'$title','$category');") or die (mysql_error());
echo "Ticket has been submitted.";
}}}

?>



<html>
<link rel="stylesheet" href="includes/in.css" type="text/css">
<style type="text/css">
<!--
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; }
.style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; }
.style11 {font-size: 10px}
.style12 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }
-->
</style>
<center>

<table width="100%" border="0" cellspacing="2" cellpadding="0">
  <tr>
    <td width="39%"> </td>
    <td width="52%"> </td>
    <td width="9%"> </td>
  </tr>
  <tr>
    <td><table width=100% align="center" cellpadding=2 cellspacing=0 rules=none class=thinline>
      <tr>
        <td height="17" align=center background=includes/grad.jpg><span class="style10"><font color=#FFFFFF>Ticket Information</font></span></td>
      </tr>
      <tr>
        <td><span class="style12"> Submit a Ticket to an Admin or a Mod, Bugs will be fixed as soon as we read the message and if it is very serious we will reward you. Money Bugs Only Not Typing Errors! </span>
            <p class="style12"> <font color=#CC0000>Warning</font>: Tickets may take up to 24 hours to be answered so please be patient.          </td>
      </tr>
    </table>  
      <br>  
      <table width=100% height="38" border=1 align="center" cellpadding=2 cellspacing=0 bordercolor=black class=thinline>
        <tr>
          <td height="19" colspan=2 align=center background=includes/grad.jpg><span class="style5 style11 style12"><font color=#FFFFFF>Open tickets</font></span></td>
        </tr>
  <td align=center bgcolor="#494949" class=style12 style8> Name</td>
      <td align=center bgcolor="#494949" class=style12 style8> Tickets Closed </td>
  </tr>
  <tr>
    <?
/// add ticket ppl here
$users_sup = array(
    "1" => "WentWorth",
    "2" => "Mobsterkenny",
"3" => "Trivium",
   

); 
$i = 1;
while ($i < 4){
$upstats = mysql_query("SELECT amount FROM ticketinfo WHERE username='$users_sup[$i]'");
while($getandpost = mysql_fetch_row($upstats)){
$total = $getandpost[0];
}

echo "<tr><td><a href='profile.php?viewuser=$users_sup[$i]'>$users_sup[$i]</a></td> <td>$total</td></tr>";

$i++;
}

?>
    </table></td>
    <td><table width=90% border=1 align=center cellpadding=1 cellspacing=1 bordercolor=black class="thinline">
      <tr class=title>
        <td height="15" colspan="2" background=includes/grad.jpg><div align="center"><strong>Create Help Ticket </strong></div></td>
        </tr>
      <tr class=title>
        <td width="49%" height="15"><div align="center"><span class="style10">Topic Title</span></div></td>
        <td width="51%"><div align="center">
            <input name="title" type="text" class="submit"  style=width: size="60%";>
        </div></td>
      </tr>
      <tr class=title>
        <td height="29"><div align="center"><strong>Category</strong></div></td>
        <td height="29"><form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
            <label> </label>
          <div align="center">

               <select name="category">
                <option value="Bug/Exploits Report" selected>Bug/Exploits Report</option>
                <option value="Duplicate Accounts Report">Duplicate Accounts Report</option>
                <option value="Scam Report">Scam Report</option>
                <option value="Scripter/Exploiter Report">Scripter/Exploiter Report</option>
                <option value="Credits Question">Credits Question</option>
                <option value="Other Question">Other Question</option>
              </select>
          </div>
        </form></td>
      </tr>
      <tr class=text>
        <td height="15" colspan="2" bgcolor="#494949"><div align="center"><span class="style10">Message</span></div></td>
      </tr>
      <tr class=sub>
        <td height="185" colspan="2"><div align="center">
            <textarea name="spt" style="width: 98%; height: 175px"  class="submit"></textarea>
        </div></td>
      </tr>
      <tr  class=title>
        <td colspan="2"><div align="center">
            <input name="open" type="submit" class="submit" style="background-color: #990000; bottom; background-repeat: repeat; border: 1; color: #FFFFFF; cursor: pointer; height: 20px;border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000; font-size: 7.5pt; font-weight: normal; font-colour:#FFFFFF; font-family: Verdana" value="Open Help Ticket">
            <label></label>
        </div></td>
      </tr>
    </table></td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
    <td> </td>
  </tr>
</table>
<br>
</tr>
</td>
</tr>
</table>
<br>
</form>
<br>

 

I appreaciate any help, put me out of my misery.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/75585-solved-phphtml-form-submission/
Share on other sites

What is the error?

 

This line

mysql_query("INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) VALUES ('','$username','0','0','$spt',now(),'$title','$category');") or die (mysql_error());

 

Should be

mysql_query("INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) VALUES ('','$username','0','0','$spt',now(),'$title','$category')") or die (mysql_error());

You don't need this entire chunk of code

 

<?php

if ($cat == "Bug/Exploits Report") {
    $category="Bug/Exploits Report'";
} else if ($cat == "Duplicate Accounts Report") {
    $category="Duplicate Accounts Report";
} else if ($cat == "Scam Report") {
    $category="Scam Report";
} else if ($cat == "Scripter/Exploiter Report") {
    $category="Scripter/Exploiter Report";
} else if ($cat == "Credits Question") {
    $category="Credits Question";
} else if ($cat == "Other Question") {
    $category="Other Question";

?>

 

This line

$cat = strip_tags($_POST['category']);

will store the value.

 

Here, I cleaned up the code a bit...see what this gives you.

 

<?php session_start(); ?>

<html>
<link rel="stylesheet" href="includes/in.css" type="text/css">
<style type="text/css">
<!--
.style5 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
}
.style10 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
}
.style11 {
font-size: 10px}
.style12 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
}
-->
</style>

<?php

include_once "includes/db_connect.php";
include_once"includes/functions.php";
logincheck();
$username=$_SESSION['username'];


if ($_POST['open']) {

   $spt = $_POST['spt'];
   $title = $_POST['title'];
   $spt = strip_tags($spt);
   $title = strip_tags($title);
   $cat = strip_tags($_POST['category']);

    if ($spt == "" || $title == "") {
        echo "Fill in all fields.";
        
    } else if ($spt != "" || $title != "") {
    
        $query = "INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('','$username','0','0','$spt',now(),'$title','$category')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo "Ticket has been submitted.";
        
    }
}


?>

<center>

<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="39%"> 
</td>
<td width="52%"> 
</td>
<td width="9%"> 
</td>
</tr>
<tr>
<td><table width=100% align="center" cellpadding=2 cellspacing=0 rules=none class=thinline>
<tr>
<td height="17" align=center background=includes/grad.jpg><span class="style10"><font color=#FFFFFF>Ticket Information</font></span></td>
</tr>
<tr>
<td><span class="style12"> Submit a Ticket to an Admin or a Mod, Bugs will be fixed as soon as we read the message and if it is very serious we will reward you. Money Bugs Only Not Typing Errors! </span>
<p class="style12"> <font color=#CC0000>Warning</font>: Tickets may take up to 24 hours to be answered so please be patient.          </td>
</tr>
</table>
<br>
<table width=100% height="38" border=1 align="center" cellpadding=2 cellspacing=0 bordercolor=black class=thinline>
<tr>
<td height="19" colspan=2 align=center background=includes/grad.jpg><span class="style5 style11 style12"><font color=#FFFFFF>Open tickets</font></span></td>
</tr>
<td align=center bgcolor="#494949" class=style12 style8> Name</td>
<td align=center bgcolor="#494949" class=style12 style8> Tickets Closed </td>
</tr>
<tr>

<?php

/// add ticket ppl here
$users_sup = array("1" => "WentWorth",
"2" => "Mobsterkenny",
"3" => "Trivium",


);
$i = 1;
while ($i < 4) {
    $upstats = mysql_query("SELECT amount FROM ticketinfo WHERE username='$users_sup[$i]'");
    while ($getandpost = mysql_fetch_row($upstats)) {
        $total = $getandpost[0];
    }
    
    echo "<tr><td><a href='profile.php?viewuser=$users_sup[$i]'>$users_sup[$i]</a></td> <td>$total</td></tr>";
    
    $i++;
}

?>
</table></td>
<td><table width=90% border=1 align=center cellpadding=1 cellspacing=1 bordercolor=black class="thinline">
<tr class=title>
<td height="15" colspan="2" background=includes/grad.jpg><div align="center"><strong>Create Help Ticket </strong></div></td>
</tr>
<tr class=title>
<td width="49%" height="15"><div align="center"><span class="style10">Topic Title</span></div></td>
<td width="51%"><div align="center">
<input name="title" type="text" class="submit"  style=width: size="60%";
>
</div></td>
</tr>
<tr class=title>
<td height="29"><div align="center"><strong>Category</strong></div></td>
<td height="29"><form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label> </label>
<div align="center">

<select name="category">
<option value="Bug/Exploits Report" selected>Bug/Exploits Report</option>
<option value="Duplicate Accounts Report">Duplicate Accounts Report</option>
<option value="Scam Report">Scam Report</option>
<option value="Scripter/Exploiter Report">Scripter/Exploiter Report</option>
<option value="Credits Question">Credits Question</option>
<option value="Other Question">Other Question</option>
</select>
</div>
</form></td>
</tr>
<tr class=text>
<td height="15" colspan="2" bgcolor="#494949"><div align="center"><span class="style10">Message</span></div></td>
</tr>
<tr class=sub>
<td height="185" colspan="2"><div align="center">
<textarea name="spt" style="width: 98%; height: 175px"  class="submit"></textarea>
</div></td>
</tr>
<tr  class=title>
<td colspan="2"><div align="center">
<input name="open" type="submit" class="submit" style="background-color: #990000;
bottom;
background-repeat: repeat;
border: 1;
color: #FFFFFF;
cursor: pointer;
height: 20px;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
font-size: 7.5pt;
font-weight: normal;
font-colour:#FFFFFF;
font-family: Verdana" value="Open Help Ticket">
<label></label>
</div></td>
</tr>
</table></td>
<td> 
</td>
</tr>
<tr>
<td> 
</td>
<td> 
</td>
<td> 
</td>
</tr>
</table>
<br>
</tr>
</td>
</tr>
</table>
<br>
</form>
<br>

 

Post any errors if there are any.

Try

 

<?php session_start(); ?>

<html>
<link rel="stylesheet" href="includes/in.css" type="text/css">
<style type="text/css">
<!--
.style5 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
}
.style10 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
}
.style11 {
font-size: 10px}
.style12 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
}
-->
</style>

<?php

include_once "includes/db_connect.php";
include_once"includes/functions.php";
logincheck();
$username=$_SESSION['username'];


if ($_POST['open']) {

   $spt = $_POST['spt'];
   $title = $_POST['title'];
   $spt = strip_tags($spt);
   $title = strip_tags($title);
   $cat = strip_tags($_POST['category']);

    if ($spt == "" || $title == "") {
        echo "Fill in all fields.";
        
    } else if ($spt != "" || $title != "") {
    
        $query = "INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('','$username','0','0','$spt',now(),'$title','$category')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo "Ticket has been submitted.";
        
    }
}


?>

<center>

<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="39%"> 
</td>
<td width="52%"> 
</td>
<td width="9%"> 
</td>
</tr>
<tr>
<td><table width=100% align="center" cellpadding=2 cellspacing=0 rules=none class=thinline>
<tr>
<td height="17" align=center background=includes/grad.jpg><span class="style10"><font color=#FFFFFF>Ticket Information</font></span></td>
</tr>
<tr>
<td><span class="style12"> Submit a Ticket to an Admin or a Mod, Bugs will be fixed as soon as we read the message and if it is very serious we will reward you. Money Bugs Only Not Typing Errors! </span>
<p class="style12"> <font color=#CC0000>Warning</font>: Tickets may take up to 24 hours to be answered so please be patient.          </td>
</tr>
</table>
<br>
<table width=100% height="38" border=1 align="center" cellpadding=2 cellspacing=0 bordercolor=black class=thinline>
<tr>
<td height="19" colspan=2 align=center background=includes/grad.jpg><span class="style5 style11 style12"><font color=#FFFFFF>Open tickets</font></span></td>
</tr>
<td align=center bgcolor="#494949" class=style12 style8> Name</td>
<td align=center bgcolor="#494949" class=style12 style8> Tickets Closed </td>
</tr>
<tr>

<?php

/// add ticket ppl here
$users_sup = array("1" => "WentWorth",
"2" => "Mobsterkenny",
"3" => "Trivium",


);
$i = 1;
while ($i < 4) {
    $upstats = mysql_query("SELECT amount FROM ticketinfo WHERE username='$users_sup[$i]'");
    while ($getandpost = mysql_fetch_row($upstats)) {
        $total = $getandpost[0];
    }
    
    echo "<tr><td><a href='profile.php?viewuser=$users_sup[$i]'>$users_sup[$i]</a></td> <td>$total</td></tr>";
    
    $i++;
}

?>
</table></td>
<td><table width=90% border=1 align=center cellpadding=1 cellspacing=1 bordercolor=black class="thinline">
<tr class=title>
<td height="15" colspan="2" background=includes/grad.jpg><div align="center"><strong>Create Help Ticket </strong></div></td>
</tr>
<tr class=title>
<td width="49%" height="15"><div align="center"><span class="style10">Topic Title</span></div></td>
<td width="51%"><div align="center">
<input name="title" type="text" class="submit"  style=width: size="60%";
>
</div></td>
</tr>
<tr class=title>
<td height="29"><div align="center"><strong>Category</strong></div></td>
<td height="29"><form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label> </label>
<div align="center">

<select name="category">
<option value="Bug/Exploits Report" selected>Bug/Exploits Report</option>
<option value="Duplicate Accounts Report">Duplicate Accounts Report</option>
<option value="Scam Report">Scam Report</option>
<option value="Scripter/Exploiter Report">Scripter/Exploiter Report</option>
<option value="Credits Question">Credits Question</option>
<option value="Other Question">Other Question</option>
</select>
</div>
</td>
</tr>
<tr class=text>
<td height="15" colspan="2" bgcolor="#494949"><div align="center"><span class="style10">Message</span></div></td>
</tr>
<tr class=sub>
<td height="185" colspan="2"><div align="center">
<textarea name="spt" style="width: 98%; height: 175px"  class="submit"></textarea>
</div></td>
</tr>
<tr  class=title>
<td colspan="2"><div align="center">
<input name="open" type="submit" class="submit" style="background-color: #990000;
bottom;
background-repeat: repeat;
border: 1;
color: #FFFFFF;
cursor: pointer;
height: 20px;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
font-size: 7.5pt;
font-weight: normal;
font-colour:#FFFFFF;
font-family: Verdana" value="Open Help Ticket">
<label></label>
</div></td>
</tr>
</table></td>
<td> 
</td>
</tr>
<tr>
<td> 
</td>
<td> 
</td>
<td> 
</td>
</tr>
</table>
<br>
</tr>
</td>
</tr>
</table>
<br>
</form>
<br>

Change this

 

<?php

if ($_POST['open']) {

   $spt = $_POST['spt'];
   $title = $_POST['title'];
   $spt = strip_tags($spt);
   $title = strip_tags($title);
   $cat = strip_tags($_POST['category']);

    if ($spt == "" || $title == "") {
        echo "Fill in all fields.";
        
    } else {
    
        $query = "INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('','$username','0','0','$spt',now(),'$title','$category')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo "Ticket has been submitted.";
        
    }
}

?>

 

To

 

<?php

if ($_POST['open']) {

   $spt = strip_tags(trim($_POST['spt']));
   $title = strip_tags(trim($_POST['title']));
   $cat = strip_tags($_POST['category']);

    if (empty($spt) && empty($title)) {
        echo "Fill in all fields.";
        
    } else if ($spt != "" || $title != "") {
    
        $query = "INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('','$username','0','0','$spt',now(),'$title','$category')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo "Ticket has been submitted.";
        
    }
}


?>

I need to mention one thing, ANY data that gets inserted into the database needs to be sanitized properly. In current PHP versions (don't ask me specifics), we have a mysql_real_escape_string to do that for us.

 

IE:

$variable = mysql_real_escape_string($_GET['variable']);
$vars = mysql_real_escape_string($_POST['vars']);

 

This covers the basic sql injections, you can add trim(), strip_tags(), str_replace, anything on top of that as you like, as long as you do mysql_real_escape_string FIRST and before you insert data into the database.

 

poco i applied ur changes and this time it echos that the ticket has been submitted!

 

that still leaves the problem of inserting row in table

 

Well, what is wrong with the insertion? Do you get an error? Make sure you uncomment the insert code, I accidentally posted it commented out, then I fixed it.

Okay, do this and post what it gives you.

 

<?php

        $query = "INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('','$username','0','0','$spt',now(),'$title','$cat')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo '<p>'.$query.'<p>';

?>

 

Your id field should be empty...thats what you set it to be in the query. And the category variable should be $cat, not $category. I'm not sure whats going on with the $title var though.

i get this echoed on a completely new page:

 

INSERT INTO `support` (`id`, `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) VALUES ('','username','0','0','title',now(),'','')

Duplicate entry '' for key 1

 

shouldn't it be genrating a new id?

also looks like it still hasn't put in a value for id,category,title

Okay, just don't fill in your "id" field for the table. Do you have it set to auto-increment in the DB?

 

Do this

 

<?php

        $query = "INSERT INTO `support` ( `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('$username','0','0','$spt',now(),'$title','$cat')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo '<p>'.$query.'<p>';

?>

i did auto_increment and updated code

now on the same page above the table i get the following echoed:

 

INSERT INTO `support` ( `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) VALUES ('WentWorth','0','0','message testing',now(),'','Scam Report')

 

its recognising the category now but not title

 

 

Okay...this *should* work.

 

<?php session_start(); ?>

<html>
<link rel="stylesheet" href="includes/in.css" type="text/css">
<style type="text/css">
<!--
.style5 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
}
.style10 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
}
.style11 {
font-size: 10px}
.style12 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
}
-->
</style>

<?php

include_once "includes/db_connect.php";
include_once"includes/functions.php";
logincheck();
$username=$_SESSION['username'];


if ($_POST['open']) {

   $spt = strip_tags(trim($_POST['spt']));
   $title = strip_tags(trim($_POST['title_insert']));
   $cat = strip_tags($_POST['category']);

    if (empty($spt) && empty($title)) {
        echo "Fill in all fields.";
        
    } else {
    
        $query = "INSERT INTO `support` ( `writer`,`reply`,`read`,`ticket`,`time`,`title`,`category`) 
        VALUES ('$username','0','0','$spt',NOW(),'$title','$cat')";
        $result = mysql_query($query)or die($query.'<br>'.mysql_error());
        
        echo '<p>'.$query.'<p>';
        
    }
}


?>

<center>

<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="39%"> 
</td>
<td width="52%"> 
</td>
<td width="9%"> 
</td>
</tr>
<tr>
<td><table width=100% align="center" cellpadding=2 cellspacing=0 rules=none class=thinline>
<tr>
<td height="17" align=center background=includes/grad.jpg><span class="style10"><font color=#FFFFFF>Ticket Information</font></span></td>
</tr>
<tr>
<td><span class="style12"> Submit a Ticket to an Admin or a Mod, Bugs will be fixed as soon as we read the message and if it is very serious we will reward you. Money Bugs Only Not Typing Errors! </span>
<p class="style12"> <font color=#CC0000>Warning</font>: Tickets may take up to 24 hours to be answered so please be patient.          </td>
</tr>
</table>
<br>
<table width=100% height="38" border=1 align="center" cellpadding=2 cellspacing=0 bordercolor=black class=thinline>
<tr>
<td height="19" colspan=2 align=center background=includes/grad.jpg><span class="style5 style11 style12"><font color=#FFFFFF>Open tickets</font></span></td>
</tr>
<td align=center bgcolor="#494949" class=style12 style8> Name</td>
<td align=center bgcolor="#494949" class=style12 style8> Tickets Closed </td>
</tr>
<tr>

<?php

/// add ticket ppl here
$users_sup = array("1" => "WentWorth",
"2" => "Mobsterkenny",
"3" => "Trivium",


);
$i = 1;
while ($i < 4) {
    $upstats = mysql_query("SELECT amount FROM ticketinfo WHERE username='$users_sup[$i]'");
    while ($getandpost = mysql_fetch_row($upstats)) {
        $total = $getandpost[0];
    }
    
    echo "<tr><td><a href='profile.php?viewuser=$users_sup[$i]'>$users_sup[$i]</a></td> <td>$total</td></tr>";
    
    $i++;
}

?>
</table></td>
<td><table width=90% border=1 align=center cellpadding=1 cellspacing=1 bordercolor=black class="thinline">
<tr class=title>
<td height="15" colspan="2" background=includes/grad.jpg><div align="center"><strong>Create Help Ticket </strong></div></td>
</tr>
<tr class=title>
<td width="49%" height="15"><div align="center"><span class="style10">Topic Title</span></div></td>
<td width="51%"><div align="center">
<input name="title_insert" type="text" class="submit"  style=width: size="60%";
>
</div></td>
</tr>
<tr class=title>
<td height="29"><div align="center"><strong>Category</strong></div></td>
<td height="29"><form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label> </label>
<div align="center">

<select name="category">
<option value="Bug/Exploits Report" selected>Bug/Exploits Report</option>
<option value="Duplicate Accounts Report">Duplicate Accounts Report</option>
<option value="Scam Report">Scam Report</option>
<option value="Scripter/Exploiter Report">Scripter/Exploiter Report</option>
<option value="Credits Question">Credits Question</option>
<option value="Other Question">Other Question</option>
</select>
</div>
</td>
</tr>
<tr class=text>
<td height="15" colspan="2" bgcolor="#494949"><div align="center"><span class="style10">Message</span></div></td>
</tr>
<tr class=sub>
<td height="185" colspan="2"><div align="center">
<textarea name="spt" style="width: 98%; height: 175px"  class="submit"></textarea>
</div></td>
</tr>
<tr  class=title>
<td colspan="2"><div align="center">
<input name="open" type="submit" class="submit" style="background-color: #990000;
bottom;
background-repeat: repeat;
border: 1;
color: #FFFFFF;
cursor: pointer;
height: 20px;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
font-size: 7.5pt;
font-weight: normal;
font-colour:#FFFFFF;
font-family: Verdana" value="Open Help Ticket">
<label></label>
</div></td>
</tr>
</table></td>
<td> 
</td>
</tr>
<tr>
<td> 
</td>
<td> 
</td>
<td> 
</td>
</tr>
</table>
<br>
</tr>
</td>
</tr>
</table>
<br>
</form>
<br>

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.