Title: How do I create a page with a dynamic id?
Tags: form;php
Question: Here’s an example: I have a job samuel39@example.net/designer and the user hits "apply" on that page. The user is then taken to a form. How can I know that the user came from www.example.com/designer and not www.example.com/developer?
Comment: Unless I'm misunderstanding, why wouldn't you just include that data as part of the form submission?

Comment: I think I didn’t explain clearly enough.
Basically what I need is that when a user submits the form, I know which job post they wanted to apply for.

Here is the accepted answer: Depending on how your redirect works, you can redirect and get the param in the template where the form is via:
{% set param_name = craft.request.param('param_name') %}
You can then set this param in your form template and post it to your action controller.
<input type='hidden' name='param_name' value='{{ param_name }}' /&gt;
In your action controller you can retrieve it by getting it from the post.
$param_name = craft()-&gt;request-&gt;getPost('param_name');
Is this anything you can use? Or need? Good luck!
Comment for this answer: Doesn’t solve my problem from the looks of it.
Here’s an example:
I have a job samuel39@example.net/designer and the user hits "apply" on that page. The user is then taken to a form. How can I know that the user came from www.example.com/designer and not www.example.com/developer?
Comment for this answer: Can you edit your question with this new information, i will update my answer then.
Comment for this answer: @ClintTabone you would just append the param to the "apply" link like so: `Apply`


{'source': 'StackExchangeDataset', 'subset': 'craftcms.stackexchange.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:07/30/15', 'FavoriteCount': 0.0, 'PostTypeId': 1, 'Tags': '<form><php>', 'Title': 'How do I create a page with a dynamic id?', 'ViewCount': 72, 'id': 10777, 'user_AboutMe': '<p>I am currently employed by EC English Language Centres, and no, I’m not an English teacher (language schools need designers too!) At EC, I’m responsible for almost anything that is related to web design, from front-end development to Drupal theming, interface design to split testing, and more.</p>\n\n<p>Starting off in print, I have slowly moved on to web design in the past three years. This means that I have over five years of experience in graphic design. During this time, I’ve grown a passion for usability and a love for typography.</p>\n', 'user_AccountId': 1111178.0, 'user_DisplayName': 'Clint Tabone', 'user_Reputation': 89.0, 'user_Views': 2.0, 'user_id': 2224.0}}