I didn’t know how to ask professional so if topic is wrong, please correct it.
My problem is quite complicated. I was training on symfony webpage how to generate form and then send this data to another page.
But now i would like do something different. I would like create page xyzSuccess.php.
Then generate 29 links on this page. Each links would have its own number.
Each link would redirect to the same page. For example numberSuccess.php. After that, this site would give me data of the number which i clicked.
I will show the example 🙂
I dont know how to do this, i don’t want use any database eq. *sql
So far i created only page xyz.php which use php for loop. I see that action.class.php would work with it if i would use submit button, but i really dont have any idea how make this working with links. And… that problem with storing data 🙁 maybe create file in lib/form ?
corrected the link to page (deleted success which used only in templates), guy under is right 🙂
First of all, you’re talking about URL’s like
/web/numberSuccess… That probably means you’ve misconfigured the root. Also see this question, asked today.Then it’s common to give your actions names like
number, and then in you’re actions file you have theexecuteNumberaction, which then renders thenumberSuccesstemplate. So you shouldn’t include theSuccessin the action name/URL.Then, your question:
What I would do, if you don’t want to use a database:
links.txtin your/datadirectory, and on every line create an url, followed by a space and then the title of your link.file_get_contents(), explode it on the newline-character, and assign this array to the view.number, and explode each item on the first space, so you can display the title.