Tatws24 Tatws24 - 1 year ago 118
HTML Question

PHP / MySQLi syntax with HTML table

I'm looking for my

table to perform a sort, but only if the search form has not been sent.

Can someone help me with the correct syntax please?

<th><?php if(!isset($_POST['search'])) { echo "<a href='?orderby=FirstName&order="$firstOrder";' }?>">First Name</a></th>


Answer Source

You have to look around quotes changes. Do like below:-

<th><?php if(!isset($_POST['search'])) { echo "<a href='?orderby=FirstName&order=".$firstOrder."'>First Name</a>"; }?></th>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download