Jump to content


Photo

Using a form to generate an address


  • Please log in to reply
3 replies to this topic

#1 ajsuk

ajsuk
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 25 September 2006 - 01:53 PM

Hey, I'm looking to make up a dressing room builder type system with custom clothing parts to select from.
I'm thinking of doing it using a form which then hopefully generates the correct address to display the custom outfit.

I'd somehow like to produce the page so it displayed:

The output area

{tshirt}
{pants}

Builder

{form}

 

Just as a simple example the form could consist of two sets of radio buttons with red, green & blue options for shirts and pants...
Once the form was completed and submited it'd need to tell the address bar to generate something like this: http://mydomain.com/...reen&pants=blue

Which would then change the output display on the page and also the URL would be there to copy incase anybody wanted to directly link to an outfit.

Thats me pretty much done, thanks for any help or suggestions I get. I'm no good at this stuff at all so it'd be much appreciated!

-A

#2 gerkintrigg

gerkintrigg
  • Members
  • PipPipPip
  • Magician
  • 828 posts
  • LocationBristol, UK
  • Age:37

Posted 25 September 2006 - 02:04 PM

er... why not have a drop down list for each clothing part, the value of each list relating to the address of an image... you could then write simple code to display the clothing pictures based on these variables.

any form submission script would work. You could even build it into a database system and have javascript update functions to update the costume dynamically without having to submit it using PHP.

Is this what you mean?
Neil Trigger - http://www.ghostlypublishing.co.uk - Ghostly Publishing - Children's Fantasy Books

#3 ajsuk

ajsuk
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 25 September 2006 - 02:14 PM

Yeah, thats along the right lines and how I thought about doing it at first but I like the idea of using PHP so that it can generate the custom URL which people can then copy and pass on to generate their custom outfit without selecting all of the options again to rebuild it.

#4 ajsuk

ajsuk
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 27 September 2006 - 08:42 PM

Ok, after some playing I've found that the get form method will produce the URL for me and display what I want.

The only problem is that form forgets whats been filled in when submited, which is a pain if the user perhaps wants to keep most of  the outfit as is and only edit one or two clothing options...

Is there a way I can get the form to recall the submited info, or even pull back the values from the newly generated url..?

Thanks,

A




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users