I want to pass selected value on invoice.php file using jquery. After sending value on invoice.php file. I want to show invoice.php file echo result on index.php page selected input box. Like an example: If anyone select Item then rate show on rate input box. Here is my code and image


index.php file code:

HTML Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">


function calculate() {
var iteam = [];
    $(".iteam").each(function() {
            var num=(this.value);

            function(data) {
<style type="text/css">
    border: 1px solid black;
    border-bottom: none;
    width: 300px;

    border-left: 1px solid black;
    border-bottom: 1px solid black;
    padding:5px 5px 5px 5px;
    border-left: none;
    border-bottom: 1px solid black;
        <form method='post' name='form1' action='welcome.php'>
        <table cellpadding="0" cellspacing="0">
                <td id="first">Iteam</td>
[PHP]            <?php
            for ($i=0; $i<$num; $i++)
                echo "
                 <td id='first'>
                 <select class='iteam' name='iteam'>
                 <option>Select one</option>
                 <option>Deluxe Plan</option>
                 <option>Premium Plan</option>
                 <option>Standard Plan</option>
                 <option>Economy Plan</option>
                <td><input class='rate' type='text' name='rate'/></td>
invoice.php file code:

PHP Code:
include "dbconnect.php";


$query="select * from iteam where iteam_name='$product'";
$result=mysql_query or die (mysql_error());


I am trying so hard to solve this problem. But I can't find out the problem. So pls pls pls... help me.