LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 12-25-2003, 06:50 PM   #1
micro_sucks
LQ Newbie
 
Registered: Dec 2003
Posts: 11

Rep: Reputation: 0
willing to pay $$$ PHP / Javascript multiple paged form; carrying over variables


I am in need of a lot of help in making a php / javascript form. The first thing that I need is a page in php that has a drop down menu that allows a selection of 2 locations, San Jose, California and Los Angeles, California
The next thing needed is the selection of a number of players, I need a drop down box for this with even numbers only 10-32
Next thing needed is a web hosting radio boxes, there will be 2 selections, one that says basic web hosting which is selected by default and another that is premium webhosting which adds 7 dollars to the total. Now in real time I need two places in which it lists the total, which will be
3.50 * number of players selected + web hosting price
Then after selecting next I need these variables carried on to another page personal.php on the personal.php these variables should be echo'd at the begining followed by a personal section that reads :
First Name
Last Name
Address
Phone Number
E-mail
AIM or MSN messenger
City
State
Zip Code

Then a details section that reads
Subdomain wanted :
you.godaddy.com

I already have a subdomain and would like godaddy to host it :

then everything will be collected and we will move onto the next page; at this page all information will be echo'd and then 2 radio boxes, one selecting paypal, or the other being postal. If selected postal and submit user will be forwarded to a page that echo's all their info, and tells them to mail it to an address.
If selecting paypal the customized total will be carried on to a paypal subscription page which will use the total to be billed as a monthly subscription. After payment I want an email with all the info submitted during the php forms, i don't know if this is possible so I wouldn't mind recieving the info before they paid, also if paying by paypal the information in the forms it would be good if they were included in the paypal notes or something. I am willing to pay some money to have this done for me say around $20 I am willing to bend if really needed, however I am only a student so I can't afford that much money. THe following pages have exactly what I am looking for and the source can be easily seen, my only real problem is carrying these variables over to the next page :
http://www.bfgservers.com/order.php
http://services.wickedservers.com/s...asty_battle.php

Attached is the ripped source from the second link with all the junk removed, also when emailed to me I would like it to say
Location: (location selected)
Number of players : (number of players selected)
Ect
Code:
<HTML>
<HEAD>
<TITLE>WickedServers.com Services</TITLE>
<meta name="description" content="WickedServers.com services include Game server rentals, dedicated game servers, voice servers, co-location and web hosting">
<meta name="keywords" content="Game server rentals, dedicated game servers, voice servers, co-location, web hosting">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<link href="http://services.wickedservers.com/services/services.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript>
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</SCRIPT>
</HEAD>

            <!-- body start --><SCRIPT language=JavaScript>
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

var arrGameType = new Array();
arrGameType[0]=0.00;
arrGameType[63]=3.50;

var arrWebHostingType = new Array();
arrWebHostingType[52]=0.00;
arrWebHostingType[54]=0.00;
arrWebHostingType[45]=7.00;
arrWebHostingType[46]=27.00;
arrWebHostingType[47]=52.00;


function OnChangeCategory(form)
{
	//Get checked values
	var stats;
	var web;
	var mods;
	var voice;
	
	if( form.WebHosting[0].checked )
	{
	    var web = form.WebHosting[0].value; 
	}
	else if( form.WebHosting[1].checked )
	{
	    var web = form.WebHosting[1].value; 
	}
	else if( form.WebHosting[2].checked )
	{
	    var web = form.WebHosting[2].value; 
	}
	else if( form.WebHosting[3].checked )
	{
	    var web = form.WebHosting[3].value; 
	}
	else if( form.WebHosting[4].checked )
	{
	    var web = form.WebHosting[4].value; 
	}
			
	var Total = ( g_dTotal ) + ( arrWebHostingType[(web - 0 )] ) + ( arrGameType[(form.GameType.value - 0)] * (form.num_players.value - 0) );
	
    UpdatePrice (Total);
	
    form.game_server_type.value = (form.GameType.value - 0);
	form.game_features_type_web_hosting.value = (web - 0);
	form.location_selection.value = (form.location.value - 0);
}

function ChangeinnerHTML(layerid, htmlcode) {
    var statement = '';   
	
    if (document.all) 
	  statement += "document.all['" + layerid + "'].innerHTML = '" + htmlcode + "';";	     
    else if (document.getElementById)           
	  statement += "document.getElementById('" + layerid + "').innerHTML = '" + htmlcode + "';"; 
    
    eval(statement);    
}

function ValidNumber (str)
{
   return ! isNaN (str * 1);
}
</SCRIPT>            
         
<table width="100%" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="46%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="1" height="1"  bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
          <td height="1" bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
          <td width="1" height="1"  bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
        </tr>
        <tr> </tr>
        <tr> 
          <td width="1" height="1"  bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
          <td height="1" bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
          <td width="1" height="1"  bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
        </tr>
      </table></td>
  </tr>
</table>
              <table width="102%" border="0" cellpadding="4" cellspacing="4">
                <tr>
                  
    <td width="964" height="628" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="1" height="1"  bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                        <td height="1" bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                        <td width="1" height="1"  bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                      </tr>
                      <tr>
                        <td width="1" bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                        <td align="center" valign="top" bgcolor="#252525"><form name="form1" method="get" action="../../index.php">
                        
              <table width="100%" border="0">
                <tr> 
                  <td colspan="3" valign="top"><table width="100%" border="0">
                      <tr> 
                        <td width="52%"><font color="#FFCC00" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Select 
                          Your Game Server Options</strong></font> </td>
                        <td width="28%" align="right"><font color="#FFCC00"><strong>Total 
                          Monthly Fee:</strong></font></td>
                        <td width="20%"><span class=price><b>$</b><b id=pricetop name="pricetop"></b></span></td>
                      </tr>
                    </table></td>
                </tr>
                <tr valign="top"> 
                  <td colspan="3"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr bgcolor="#62605B"> 
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                      </tr>
                      <tr bgcolor="#333331"> 
                        <td width="8" valign="middle"><img src="/images/spacer.gif" width="4" height="20"></td>
                        <td width="82%" valign="middle"><font class="selection">Location</font></td>
                        <td width="12" align="center" valign="middle">&nbsp;</td>
                        <td width="67" valign="middle"> <div align="right"><a href="javascript:;" onClick="MM_openBrWindow('../../../learnmore/datacenters.html','learnmore','scrollbars=yes,width=600,height=400')" class="learnmore">Learn 
                            More</a></div></td>
                      </tr>
                      <tr bgcolor="#62605B"> 
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td width="5%" align="right" valign="top">&nbsp;</td>
                  <td colspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td>&nbsp;</td>
                        <td valign="middle">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td width="38%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
                          <select id=select3 
  style="COLOR: #06303d; FONT-FAMILY: verdana, geneva, helvetica, arial; BACKGROUND-COLOR: #ffffff" 
  onChange="OnChangeCategory(this.form);" 
  name=location>
                            <option value="28">Los Angeles, California 
                            <option value="27">San Jose, California 
                          </select>
                          </font></td>
                        <td width="62%" valign="middle"><span class="learnmore">Datacenter</span><font face="Verdana, Arial, Helvetica, sans-serif" size="2">&nbsp; 
                          </font></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td valign="top">&nbsp;</td>
                  <td colspan="2" valign="top">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="3" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr bgcolor="#62605B"> 
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                      </tr>
                      <tr bgcolor="#333331"> 
                        <td width="8" valign="middle"><img src="/images/spacer.gif" width="4" height="20"></td>
                        <td width="82%" valign="middle"><font class="selection">Players</font></td>
                        <td width="12" align="center" valign="middle"><a href="javascript:;" onClick="MM_openBrWindow('../../../learnmore/players.html','learnmore','scrollbars=yes,width=600,height=400')"><img src="/images/buttons/i.gif" border="0"></a></td>
                        <td width="67" valign="middle"> <div align="right"><a href="javascript:;" onClick="MM_openBrWindow('../../../learnmore/players.html','learnmore','scrollbars=yes,width=600,height=400')" class="learnmore">Learn 
                            More</a></div></td>
                      </tr>
                      <tr bgcolor="#62605B"> 
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td align="right" valign="top">&nbsp;</td>
                  <td colspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td>&nbsp;</td>
                        <td valign="middle" class="learnmore">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td width="9%"><select id=select4
  style="COLOR: #06303d; FONT-FAMILY: verdana, geneva, helvetica, arial; BACKGROUND-COLOR: #ffffff"
  onChange="OnChangeCategory(this.form);" 
  name=num_players>
                            <option value="12">12</option>
                            <option value="14">14</option>
                            <option value="16">16</option>
                            <option value="18">18</option>
                            <option value="20">20</option>
                            <option value="22">22</option>
                            <option value="24">24</option>
                            <option value="26">26</option>
                            <option value="28">28</option>
                            <option value="30">30</option>
                            <option value="32">32</option>
                          </select> </td>
                        <td width="91%" valign="middle" class="learnmore">Maximum</td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td align="right" valign="top">&nbsp;</td>
                  <td width="5%" valign="top">&nbsp;</td>
                  <td width="90%" valign="top"> <input name="GameType" type="hidden" value="63"> 
                    <input type="hidden" name="game_server_type" value="0"> <input type="hidden" name="game_features_type_web_hosting" value="0"> 
                    <input type="hidden" name="location_selection" value="0"> 
                    <input type="hidden" name="game_features_type[20]" value="1"> 
                    <input type="hidden" name="next" value="personal"> <input type="hidden" name="name" value="Game_Server_Signup"> 
                  </td>
                </tr>
                <tr> 
                  <td colspan="3" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr bgcolor="#62605B"> 
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                      </tr>
                      <tr bgcolor="#333331"> 
                        <td width="8" valign="middle"><img src="/images/spacer.gif" width="4" height="20"></td>
                        <td width="82%" valign="middle"><font class="selection">Web 
                          Hosting Packages </font></td>
                        <td align="center" valign="middle"><a href="javascript:;" onClick="MM_openBrWindow('/services/signup/hosting/','learnmore','scrollbars=yes,width=750,height=400')"><img src="/images/buttons/i.gif" border="0"></a></td>
                        <td valign="middle"> <div align="right"><a href="javascript:;" onClick="MM_openBrWindow('/services/signup/hosting/','learnmore','scrollbars=yes,width=750,height=400')" class="learnmore">Learn 
                            More</a></div></td>
                      </tr>
                      <tr bgcolor="#62605B"> 
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                        <td><img src="/images/spacer.gif" width="1" height="1"></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td align="right" valign="top">&nbsp;</td>
                  <td align="center" valign="middle">&nbsp;</td>
                  <td valign="middle">&nbsp;</td>
                </tr>
                <tr> 
                  <td align="right" valign="top">&nbsp;</td>
                  <td align="center" valign="middle"><input name="WebHosting" type="radio" value="54" onClick="OnChangeCategory(this.form)" checked> 
                  </td>
                  <td valign="middle"><span class="learnmore">Basic Web Hosting</span> 
                    <span class="brackets">[</span><span class="selection">Free</span><span class="brackets">]</span></td>
                </tr>
                <tr> 
                  <td align="right" valign="top">&nbsp;</td>
                  <td align="center" valign="middle"><input name="WebHosting" type="radio" value="45" onClick="OnChangeCategory(this.form)"> 
                  </td>
                  <td valign="middle"><span class="learnmore">Premium Web Hosting</span> 
                    <span class="brackets">[</span><span class="selection">+7</span><span class="brackets">] 
                    </span></td>
                </tr>
                <tr> 
                  <td align="right" valign="top">&nbsp;</td>
                  <td align="center" valign="top">&nbsp;</td>
                  <td valign="top">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="3" align="right" valign="top"> <table width="100%" border="0">
                      <tr> 
                        <td> <div align="center"><font color="#FFCC00"><strong>Total 
                            Monthly Fee:</strong></font><span class=price><b>$</b><b id=pricebtm name="pricebtm"></b></span></div></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td colspan="3" align="center" valign="top">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="3" align="center" valign="top"> <input name="imageField2" type="image" src="/images/buttons/next.gif" width="64" height="19" border="0"> 
                  </td>
                </tr>
                <tr> 
                  <td colspan="3" align="right" valign="top">&nbsp;</td>
                </tr>
              </table>
                            </form>
                        </td>
                        <td width="1" bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                      </tr>
                      <tr>
                        <td width="1" height="1" bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                        <td height="1"  bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                        <td width="1" height="1"  bgcolor="#62605B"><img src="../../../images/gray_dot.gif" width="1" height="1"></td>
                      </tr>
                    </table>
                  
      
      <p>&nbsp;</p></td>
                  
    <td width="189" align="center" valign="top">-</td>
                      <td width="1" bgcolor="#62605B"><img src="/images/gray_dot.gif" width="1" height="1"></td>
                    </tr>
                    
                  </table></td>
                </tr>
              </table>
                           <SCRIPT language=JavaScript>
var arrPrices = new Array();

function initPriceAndCategories()
{
 g_dTotal = 0.00;  // Charged base price
 
 OnChangeCategory(form1);

}

function UpdatePrice(price)
{
 viewprice = price;
 totalprice = viewprice + "";
 if (totalprice.indexOf (".") == -1)
   totalprice += ".00";

ChangeinnerHTML("pricebtm", totalprice);
ChangeinnerHTML("pricetop", totalprice);    
}

function Init () 
{
   initPriceAndCategories();
}

// Main browser code
var g_dTotal;
Init();

</SCRIPT>
<!--body end -->
        

</BODY>
</HTML>
 
Old 12-26-2003, 09:37 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Please do not offer that your are willing to pay money as that comes off as advertising which is against our rules.

If you want help, ask it. If you want to pay someone to do the work for you, well, buy some text ads on this site or something, but don't offer any member money, were not the classifieds.

Review the rules here: http://www.linuxquestions.org/rules.php
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use PHP variables in javascript? nickiv Programming 1 06-07-2005 05:41 AM
Adding javascript variables to a PHP query Elijah Programming 7 11-07-2004 07:28 PM
Pass multiple URL variables PHP agallant Programming 3 10-21-2004 07:29 PM
PHP:Unable to post variables from html form to mysql database vikram_cvk Linux - Software 1 09-29-2004 03:01 PM
Problems with php 4.2.1 form-data and hidden variables coea77 Programming 1 10-10-2002 03:24 AM


All times are GMT -5. The time now is 07:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration