Xanco Posted August 20, 2013 Share Posted August 20, 2013 Hello peoples. I am trying to write a php script that connects to a database then selects data depending on user input. However, it's more than likely that the user will get more than one result, and I cannot say how many they're going to get. Is there anyway that I can just generate variables, store them and use them on another page? Like for example: The user searches for Joe, the variables would be: Name_1 = ... Name_2 = ... Name_3 = ... But if another user searches John the variables would be: Name_1 = ... Name_2 = ...Name_3 = ... Name_4 = ... Name_5 = ... How can I do this? Thanks, Xanco Link to comment https://forums.phpfreaks.com/topic/281407-generate-new-variable-to-use-later/ Share on other sites More sharing options...
kicken Posted August 20, 2013 Share Posted August 20, 2013 Read up on arrays Link to comment https://forums.phpfreaks.com/topic/281407-generate-new-variable-to-use-later/#findComment-1446025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.