Jump to content

Using a form to generate an address


ajsuk

Recommended Posts

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:

[u]The output area[/u]

{tshirt}
{pants}

[u]Builder[/u]

{form}

[hr]

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/?shirt=green&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
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.