0
画像に見られるように、値が別の場所にある必要があります.6値がありますが、別の単語を使用する値1の場合、一般的な値に変更する方法
http://image.prntscr.com/image/8c26c451b10a481f9a8d0aaba16bf311.png
あなたが写真で見ることができるように、私は価値がどこか別の場所でなければなりませんしたい、私が?に上がる6つの値を持っているのではなく、それは
を使用する別の単語に行くだろうhttp://image.prntscr.com/image/1d271a5f156842d0ac88c5f9c8e114aa.png
p私はそれがそうであることを望みます。チェックは値2です。それは他のものになります。その後、$types
を移動するために良いでしょう
$types = [1 => 'General', 2 => 'Support'];
echo "<td>".(isset($types[$row['issue_no']]) ? $types[$row['issue_no']] : $row['issue_no'])."</td>";
に変更行
echo "<td>".$row['issue_no']."</td>";
<?php
$con = mysql_connect("localhost","root","**");
if($con)
{
$db = mysql_select_db("habix");
if($db)
{
$sql = "select * from user_tickets_table";
$result = mysql_query($sql);
if($result)
{
echo "<table border='1' style='width:100%'>";
echo "<tr>";
echo "<th>ID</th>";
echo "<th>Tittel</th>";
echo "<th>Beskjed</th>";
echo "<th>Dato</th>";
echo "<th>Type</th>";
echo "<th>Svar</th>";
echo "<th>Mer Muligheter</th>";
echo "</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr id='".$row['id']."'>";
echo "<td>".$row['id']."</td>";
echo "<td><textarea style='border:0px'>".$row['title']."</textarea></td>";
echo "<td><textarea style='border:0px'>".$row['message']."</textarea></td>";
echo "<td>".$row['ticketdate']."</td>";
echo "<td>".$row['issue_no']."</td>";
echo "<td>".$row['response']."</td>";
//echo "<td><button class='btn btn-primary' value='".$row['id']."' onclick='reply(".$row['id'].")'>Reply</button><button class='btn btn-primary' onclick='remove(".$row['id'].")'>Delete</button></td>";
echo "<td>";
echo "<form action='' method='post'><input type='hidden' name='idd' value='".$row['id']."'/><input type='submit' value='Slett!' name='del' onclick='return mycheck();'/></form>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
}
else echo "Something is not right, Either there are no messages or some another error";
}
else echo "Error establishing database connection";
}
else echo "Error establishing connection to server";
?>
そのコードを置き換えるときに白い画面を表示する –
白い画面は、通常、構文エラーを意味します。私はちょうど私の変更であなたのコードをテストし、それは動作します。だからおそらく間違いを作った... –
私はそれが動作する$タイプを削除するが、私はテキストが編集されていないを参照してください –