Notice of Undefined Variable

Hi there,

I am designing a drop down list of the status of ‘Active’, ‘Study Leave’ and ‘Unpaid Leave’ using select. But I am having the notice of Undefined Variable although I have defined the variable earlier.

Here’s the code

<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="lect_status" id="lect_status">
<option value="Active" <?php if (!(strcmp("Active", $lect_status))) {echo "selected=\\"selected\\"";} ?>>Active</option>
<option value="Study Leave" <?php if (!(strcmp("Study Leave", $lect_status))) {echo "selected=\\"selected\\"";} ?>>Study Leave</option>
<option value="Unpaid Leave" <?php if (!(strcmp("Unpaid Leave", $lect_status))) {echo "selected=\\"selected\\"";} ?>>Unpaid Leave</option>

How to solve this? Thanks in advance.

Where do you define the variable?

ops, sorry guido2004. I just realize where I make my careless mistake, I manage to get the code working fine by now. Anyway, thanks for the attention and reply.