weareribbons Posted March 1, 2010 Share Posted March 1, 2010 I'm working on a project that pulls a random word from a dictionary. The user types in a word-association for that words and submits a form. I want the form to not only store the word they submit, but to also add the randomly-generated one their given. Any thoughts on how to approach this? I have the random word outputting but I think I need to create some sort of variable that captures the word in each session to be used in other parts of the site. Let me know if you have any thoughts - thanks so much. Link to comment https://forums.phpfreaks.com/topic/193792-random-row-as-form-value/ Share on other sites More sharing options...
Psycho Posted March 1, 2010 Share Posted March 1, 2010 Just populate a hidden field on the form with the ID of the random word you have pulled from the database. If you need that particular word available on later pages, then save it as a session variable. Link to comment https://forums.phpfreaks.com/topic/193792-random-row-as-form-value/#findComment-1020013 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.