Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 22nd, 2004, 01:03 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 2
Submittin form to a variable from drop down list

I'm sure this is easy to do but I can't think of a method, so any help would be much appreciated.

In a form, I have a drop down list populated from a database. When the user selects an item and clicks "submit" I want the action of the form to be the selected item. For example, imagine the list contains:
Horse
Mouse
Cat
Dog

The user selects "Cat" and clicks the "submit" button. I want the action to go to "cat.php"

Thanks in advance.


Reply With Quote
  #2  
Old June 27th, 2004, 04:54 AM
DoctorK DoctorK is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: USA
Posts: 43 DoctorK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Submittin form to a variable from drop down list

Why not use a "jump off" page?

send the form to to post.php

php Code:
Original - php Code
  1.  
  2. //post.php
  3. //redirect to your wanted location
  4. //replace: selectname & your web address
  5.  
  6. $location = $_POST["selectname"];
  7. //or $location = $_GET["selectname"];
  8. $gotome = '<HTML><HEAD>' .
  9. "<meta http-equiv='Refresh' content='0;
  10. URL= http://your.url.com/yourfolder/"."$location".".extension' >" . '</HEAD></HTML>';
  11.  
  12. echo $gotome;

Reply With Quote
  #3  
Old June 28th, 2004, 12:36 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 2
RE: Submittin form to a variable from drop down list

Thanks for you reply.

Thinking through the problem, your solution of using a jump page is what I eventually did. However, I used Javascript as there is an abundance of this type of script of the Internet and I'm no Javascript programmer. Also, this is for our intranet so I know that Javascript won't be disabled on the browser.

Thanks again for your time to reply, it is appreciated.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Submittin form to a variable from drop down list


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Try It Free




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway