Forum Moderators: coopster

Message Too Old, No Replies

unexpected T STRING error message

         

stevey2005

11:33 am on Aug 18, 2006 (gmt 0)

10+ Year Member



<option value="TSIC"<?php print $_POST['centre']=='TSIC'? 'selected="selected"':'';?>>TSIC</option>

I keep getting this error "unexpected T STRING". Ive looked through the line of code several times and cant seem to find anything wrong with it

dreamcatcher

1:21 pm on Aug 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Usually the error is on the previous line. Have you checked that?

dc

barns101

1:24 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



I just ran the code (with and without posting that value to it) and it worked fine. Could it be an error on the previous line?

** Edit **
Dreamcatcher beat me to it!

stevey2005

2:22 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



Have already checked the previous line of code:

<td class="detail"><select name="centre" class="indent">

dreamcatcher

2:34 pm on Aug 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think we are going to need some more code. Try posting the 3 lines either side of the one that the message is saying the error is on.

dc

stevey2005

2:36 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



<tr>
<td class="label"><label for="centre">Centre:</label></td>
<td class="detail">
<select class="indent" name="centre">
<option value="TSIC" <?php print $_POST['membertype']=='TSIC'? 'selected="selected"':'';?>>TSIC</option></option>
<option value="SIC" <?php print $_POST['membertype']=='SIC'? 'selected="selected"':'';?>>SIC</option>
<option value="TEIC" <?php print $_POST['membertype']=='TEIC'? 'selected="selected"':'';?>>TEIC</option>
</select>
</td>
</tr>

dreamcatcher

2:52 pm on Aug 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



None of those lines will give you an error, so it must be something else. Are you sure you are in the right area?

dc

stevey2005

2:55 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



This code is within table tags and other form elements are also present above and below.

dreamcatcher

6:58 pm on Aug 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want to sticky me your url, I`ll take a look for you.

dc