So i have the following code:
<?php
$users_id = $_POST['users_id'];
if ($users_id=="1");
{
?>
<td><select name="User">
<option></option>
<option>John</option>
<option>Jack</option>
</select></td>
<?php
}
if ($users_id!=="1");
{
?>
<td align="left"> <input type="text" name="User" /><br></td></tr>
<?php
}
?>
I want only one form to be shown (dropdown or input), but i always get both of them and
I can’t figure it out what is wrong with my if statement.
Please help!
Thank you for your time and effort!
Remove your code and paste this one…
it will surely work
Changes made in your code
done validation of post field,
removed ; from if condition,
used if-else instead of if-if,
placed
</tr>after all processing, else it will return an visible error