Jump to content

Echo with case sensitivity


davidcriniti

Recommended Posts

Hi everyone,

 

On our school website, we've got a page where students can do a quiz, and get feedback given to them, as to whether their answers are correct or incorrect.

 

The code echos the student response for each question, and the feedback, tick / cross is displayed in the adjacent column.

 

However, I've just changed the input box from a text field to a text area, and I've noticed a little quirk.

 

The student answer, after pressing submit, now displays in lower case. Is their any way I can echo their answer, exactly as they input it.

 

Here is the relevant code:

<textarea name="user_answer_<?=$row_counter?>" cols="40" rows="2" /><?=$userAnswer?></textarea>

Thanks for your time,

Dave

Link to comment
https://forums.phpfreaks.com/topic/289211-echo-with-case-sensitivity/
Share on other sites

I agree with @requinix,

 

Might want to post the function code that handles the output. May have something like: strtolower($str); in there... ( REF: http://www.php.net//manual/en/function.strtolower.php )

 

If not maybe try another browser as @ginerjm suggested.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.