samedi 25 mars 2017

What is am I doing wrong in this IF?

<td><?php if ($results['judet'] == 'Sample1') && ($results['user_id'] == 2) { echo '<a href="edit.php?id='.$results['id'].'"> Edit</a>' } elseif ($results['judet'] == 'Sample2' && ($results['user_id'] == 1) { echo '<a href="edit.php?id='.$results['id'].'">Edit2</a>' } ?></td>

Can anyone simply explain me why am I getting an 500 http error ? The if checks few sql columns and if one condition is true , it shows text1 or text2 (if second condition is true).

I'm literally going nuts over this piece of code.

Aucun commentaire:

Enregistrer un commentaire