0

I want to display the external url like this:

www.abc.com/username

This page requires group_id, ticket_id, but i dont want to display these variables in external urls.

My routing.yml:

my_profile:
  url:   /:username
  param: { module: profile, action: index, grp_id: GRRf3eedfb7-842d-4cbd-a17f-141334cd1b4d, ticket: UAe25d7784-7b9f-499a-8e53-57f5aee91d95, display: true }

indexSuccess.php

echo url_for('@my_profile?module=profile&action=index&username='.$username.'&grp_id='.$groupID.'&ticket='.$ticket)

Note that in the routing.yml params has static grp_id and ticket. It outputs Nicely.

However, I want want to make it dynamic. grp_id and ticket should come dynamic values and they should not be visible in the URL.

j0k
  • 22,600
  • 28
  • 79
  • 90
greeta
  • 1
  • 1
  • Where do you want the dynamic values to come from? `grp_id` & `ticket` values in your database? Do you want them hidden just because they'd make a ugly URL, or because the user shouldn't know them? If you want them hidden just so you have nice urls you could past them in as post params. – John Carter Aug 20 '12 at 09:17
  • Hum, you can't. If they are dynamic, you must set them in the url. You might use session to store them without showing them in the url. – j0k Aug 20 '12 at 09:25
  • @therefromhere: Yeah, i want them hidden just because i want Nicde urls. How to pass as "post params" – greeta Aug 22 '12 at 10:51
  • via a form, look at the doctrine documentation for forms – John Carter Aug 22 '12 at 20:37
  • Sir, in my profile page, i have one or more postings.Title, description, comments. – greeta Aug 23 '12 at 04:32

0 Answers0