Tuesday, February 1, 2011

how to automatically generate a url when creating an object

Hi,

I'm using trying to learn php using cakephp (I know, I know).

I want to be able to allow users to create a page (which I call a
'campaign') that will end up at a url that consists of my domain +
their first and last names. I've got an application all set up with
regards users and campaigns and have all my tables and associations
and everything set up and working I'm just having problems with this
bit.

So I've got a baked add function in my campaign_controller with the
relevant view which consists of the form to enter all the details.

How do I make one of those form fields end up as the above described
url in the database while at the same time creating a page which you
can go to if you clicked that url?

I hope that all makes sense.

Thanks for any help!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: