<script language="Javascript">
var new_url="";
function goTo ()
{
var pay = document.radio.payment.value;
document.radio.payment.value=pay;
alert("The payment is "+pay);
if ( (new_url != "") && (new_url != null) )
window.location=new_url;
}
</script>
<body>
<?php echo ("<INPUT TYPE = HIDDEN NAME = \"payment\" VALUE=\"$payment\">\n");?>
<input TYPE="radio" NAME="button" onClick="new_url='../creditcard.php'" >
<input type="radio" name="button" onClick="new_url='http://www.htmlforums.com'">
<input name="button2" type="button" onClick="goTo()" value="Go">
</body>
the code is showing the payment that is needed to pay.
then i wish to send the value $pay to the creditcard.php (the second page that is requested)
but the problem is, the payment can be shown in the alert section (i.e. The payment is 100)
but whe i browse to the creditcard.php, the variable is undefined!
What should i do for now ??!! Any solutions?? Or i should do in another way?