Prob Displaying PHP Code in web page

Hi

I have a login screen that I have created and I have the random questions saved to a table.
I read the data into an array :
Then I wrote a function called GenerateRandomQuestion()

I need to display the random question into my textbox named “Question”.

Can’t figure out what I’m doing wrong - it’s just not working for me.

Code attached.

A quick glance at your code reveals the following mistake:


<input type="text" name="Question" readonly tabindex=-1 size="40" value="<? print('GenerateRandomQuestion();') ?>">

Try this:


<input type="text" name="Question" readonly tabindex=-1 size="40" value="<? print GenerateRandomQuestion(); ?>">