Tatws24
Tatws24

Reputation: 107

PHP / MySQLi syntax with HTML table

I'm looking for my sql 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>

Thanks

Upvotes: 1

Views: 43

Answers (1)

Death-is-the-real-truth
Death-is-the-real-truth

Reputation: 72299

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>

Upvotes: 2

Related Questions