Hello people,
I need some help with some PHP coding, and hope someone can help me.
I have a mysql table within a mysql database.
for example
id word sentence associated word
1 happy there is a lot of unhappiness unhappiness
2 consume I am a consumer consumer
3
I want to choose a random element from the associated word column
I want to make this random element a php variable $word1 (for example)
elsewhere I want to have an text input box with a submit button
I want to make what is typed a php variable, for example $word 2
I then want to compare $word1 and $word2
If they are the same, I want to echo $word2 in green
If not, I want to echo $word2 in red with an explanation
I hope my description is not too confusing
many thanks


