Page 1 of 1

Notice: Use of undefined constant

Posted: Tue Nov 03, 2009 9:47 am
by GeXus
Ok, this is silly, but can anyone tell me what's wrong with this?

Code: Select all

 
<input type="text" class="inputBox" maxlength="100" id="quiz_name" name="result[<?=$count?>][title]" value="
 
<?php if(isset($_SESSION['submitResults'][$count]['title'])){echo stripslashes($_SESSION['submitResults'][$count]['title']);}?>
 
"/> 
 
(Note: $count is a number)

I'm getting the error: Notice: Use of undefined constant title - assumed \'title\' in

Re: Notice: Use of undefined constant

Posted: Tue Nov 03, 2009 10:05 am
by Mark Baker
Possibly
<input type="text" class="inputBox" maxlength="100" id="quiz_name" name="result[<?php echo $count; ?>]['title']" value="
 
<?php if(isset($_SESSION['submitResults'][$count]['title'])){echo stripslashes($_SESSION['submitResults'][$count]['title']);}?>

Re: Notice: Use of undefined constant

Posted: Tue Nov 03, 2009 10:24 am
by GeXus
Tried that, no luck... I've narrowed it down to this:

Code: Select all

 
<?php if(isset($_SESSION['submitResults'][$count]['title'])){echo stripslashes($_SESSION['submitResults'][$count]['title']);}?>
 
But I've tried with and without quotes.... not sure what the issue is