hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : using drop-down to redirect based on choice
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

using drop-down to redirect based on choice

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-23-2003, 10:25 AM
stftk14 stftk14 is offline
Account Suspended
 
Join Date: May 2003
Posts: 1

using drop-down to redirect based on choice


Hi,

I need help with this. I am trying to setup a web hosting site but I need a form that will allow clients to choose the package they want and then choose if they want to be billed monthly or yearly. This means they will be redirected based on two choices (which package and which billing).

Please help me with code to do this:

2 drop down boxes, the first with my list of hosting options so someone can choose it, and the second drop down with choice of billing monthly or annualy. Then I want the form to take the person to a page based on their choice.

For example someone picks executive hosting with yearly billing, i would want them to be redirected to /o_executiveyearly.php

Thank you so much!
Dan

Reply With Quote


Sponsored Links
  #2  
Old 05-23-2003, 05:20 PM
Sonic Blue Sonic Blue is offline
Junior Guru Wannabe
 
Join Date: Nov 2002
Location: Do You Know what Schlitterbaugn is
Posts: 47
http://www.webhostingtalk.com/showth...hreadid=146277

Look a few rows down at that thread. The Code There Applies virutally the same

Reply With Quote
  #3  
Old 05-23-2003, 05:29 PM
aingaran aingaran is offline
Web Hosting Master
 
Join Date: Oct 2000
Location: Toronto
Posts: 1,103
PHP Code:
<?

if (!$submit)
{

echo 
"
<form action=
$PHP_SELF method=post>
<b>Select Plan: </b><select name=plan>
<option value='plan1'>Plan 1</option>
<option value='plan2'>Plan 2</option>
<option value='plan3'>Plan 3</option>
<option value='plan4'>Plan 4</option>
<option value='plan5'>Plan 5</option>
</select>

<br><br>

<b>Select Payment Cycle</b>
<select name=term>
<option value='monthly'>Every Month</option>
<option value='quarterly'>Every 3 Months</option>
<option value='semi-annually'>Every 6 Months</option>
<option value='yearly'>Every 12 Months</option>
</select>

<br><br>
<input type=submit name=submit value=submit>
</form>"
;
}

else
{
if (
$term=="yearly")
{
$schedule="yearly";
}
elseif (
$term=="semi-annually")
{
$schedule="semi-annually";
}
elseif (
$term=="quarterly")
{
$schedule="quarterly";
}
else
{
$schedule="monthly";
}
header("Location: $plan$schedule.php");
}

?>

Reply With Quote
Sponsored Links
  #4  
Old 05-23-2003, 05:32 PM
aingaran aingaran is offline
Web Hosting Master
 
Join Date: Oct 2000
Location: Toronto
Posts: 1,103
i think this might work too..?

PHP Code:
<?

if (!$submit)
{

echo 
"
<form action=
$PHP_SELF method=post>
<b>Select Plan: </b><select name=plan>
<option value='plan1'>Plan 1</option>
<option value='plan2'>Plan 2</option>
<option value='plan3'>Plan 3</option>
<option value='plan4'>Plan 4</option>
<option value='plan5'>Plan 5</option>
</select>

<br><br>

<b>Select Payment Cycle</b>
<select name=term>
<option value='monthly'>Every Month</option>
<option value='quarterly'>Every 3 Months</option>
<option value='semi-annually'>Every 6 Months</option>
<option value='yearly'>Every 12 Months</option>
</select>

<br><br>
<input type=submit name=submit value=submit>
</form>"
;
}

else
{
header("Location: $plan$term.php");
}

?>

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Rackspace Private Cloud Adds OpenCenter User Interface, More OS Choice Web Hosting News 2013-03-06 11:02:40
Netcraft Continues to See a Drop in Responses for July 2012 Web Survey Web Hosting News 2012-07-03 14:35:26
Web Host Heart Internet Launches SiteDesigner Based on BaseKit Website Builder Web Hosting News 2012-04-17 10:24:26
Web Host Claranet Launches Virtual Data Center Web Hosting News 2011-11-25 19:00:35
ViaWest Launches KINECTed Cloud Hosting, Offering Choice of VMware or Xen Hypervisor Web Hosting News 2011-11-01 15:18:12


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?