Jump to content

Generate new variable to use later


Xanco

Recommended Posts

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

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.