Note that there are some explanatory texts on larger screens.

plurals
  1. POTicket system - show message when a user does not have any tickets
    primarykey
    data
    text
    <p>I am working on a new ticket system, but something went wrong. When a user does not have an open ticket, it should show this message:</p> <pre><code> &lt;?}else{?&gt; &lt;tr&gt; &lt;td style="background:#f7f7f7;"&gt;There are no tickets submitted yet.&lt;/td&gt; &lt;/tr&gt; &lt;?}?&gt; </code></pre> <p>I probably did something wrong and I cannot figure out where. This is the code that I have:</p> <pre><code>&lt;?php if($_GET['a'] == "del" &amp;&amp; $_GET['id'] != ""){ mysql_query("DELETE FROM message WHERE id='{$_GET['id']}' LIMIT 1;"); } $msg = mysql_query("SELECT * FROM `message` WHERE `receiver`='{$_SESSION['login']}' ORDER BY date DESC")or die (mysql_error()); ?&gt; &lt;table id="nested" width="97%" cellspacing=0 cellpadding=0 style="border-collapse:collapse;"&gt; &lt;tr&gt;&lt;th width="50px"&gt;ID&lt;/th&gt;&lt;th width="110px"&gt;Date&lt;/th&gt;&lt;th width="165px"&gt;Title&lt;/th&gt;&lt;th width="90px"&gt;Status&lt;/th&gt;&lt;th align="right" width="60px"&gt;Actions&lt;/th&gt;&lt;/tr&gt;&lt;/div&gt; &lt;tbody&gt; &lt;?php while($mesg = mysql_fetch_array($msg)) { ?&gt; &lt;tr class=""&gt; &lt;th&gt;&lt;?php echo $mesg['id']; ?&gt; &lt;/th&gt; &lt;td&gt;&lt;?php echo $mesg['date']; ?&gt; &lt;/td&gt; &lt;td&gt;&lt;?php echo $mesg['title']; ?&gt; &lt;/td&gt; &lt;td&gt;&lt;?php if($mesg['readed']) { echo "Read"; }else{ echo "Unread"; } ?&gt; &lt;/td&gt; &lt;th&gt;&lt;ul class="action-buttons"&gt; &lt;li&gt;&lt;a href="#myTickets?id=&lt;?=$mesg['id']?&gt;" class="action-button" title="Read"&gt;&lt;span class="read"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#myTickets?a=del&amp;id=&lt;?=$mesg['id']?&gt;" class="action-button" title="Delete"&gt;&lt;span class="delete"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#myTickets?a=close&amp;id=&lt;?=$mesg['id']?&gt;" class="action-button" title="Close"&gt;&lt;span class="close"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;? } ?&gt; &lt;/th&gt; &lt;?}else{?&gt; &lt;tr&gt; &lt;td style="background:#f7f7f7;"&gt;There are no tickets submitted yet.&lt;/td&gt; &lt;/tr&gt; &lt;?}?&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/table&gt; </code></pre> <p>Please if anyone can help me, I would appreciate it very much, thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload