Jump to content

In a text field a visitor can fill in a name, then chose several distances


Recommended Posts

 

Hello

 

I am looking for a php code/script, that could do the following.

In a text field a visitor can fill in a type of insect, for instance a butterfly, moth or a fly.

 

If someone for instance fills in butterfly, he can also make a choice out of several distances.

If the distance:

 

If  1 miles is chosen then  /1mlbutterfly.php opens.

If  2 miles is chosen then  /2mlbutterfly.php opens.

If  5 miles is chosen then  /5mlbutterfly.php opens.

 

But if someone fills in moth then of course it should be.

 

If  1 miles is chosen then  /1mlmoth.php opens.

If  2 miles is chosen then  /2mlmoth.php opens.

If  5 miles is chosen then  /5mlmoth.php opens.

 

 

 

It opens of course as  a _parent page.

 

Hope that someone can help me.

 

Gr Yann

 

 

 

Unfortunately YFinn, what you're describing can be done using elementary PHP knowledge and simply handing you the code would not really be helping you, but likely raise more questions down the line. This forum does not really server as a place to exchange scripts, but a place to help people troubleshoot problems or answer questions with existing code. My suggestion to you, would be to learn the basics of PHP and pay special attention to if/else conditional statements, and/or case/switches.

 

Good luck to you.

what you're describing doesn't seem like an efficient way of populating results from a form. you should use a database to store and retrieve data, rather than making php pages manually and then calling them up dynamically.

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.