asked on
<?php
ini_set('display_errors','1');
error_reporting(E_ALL);
?>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Submit_OnClick
Dim TheForm
Dim Choice
Set TheForm = Document.ValidForm
Choice=TheForm.Text1.Value
if Choice<>"" then
'MsgBox "You Chose " & Choice
end if
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="ValidForm">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<INPUT NAME="Text1" TYPE="TEXT" SIZE="20">
Select Service Required:
<INPUT TYPE="radio" NAME="Prices" VALUE="1"
onClick="Text1.value = 'Fully Trackable Courier'"> Fully Trackable Courier
<INPUT TYPE="radio" NAME="Prices" VALUE="2"
onClick="Text1.value = 'Postal Airmail Service'"> Postal Airmail Service
<INPUT TYPE="radio" NAME="Prices" VALUE="3"
onClick="Text1.value = 'International Signed for'"> International Signed for
<INPUT NAME="Submit" TYPE="BUTTON" VALUE="Assign">
</FORM>
<?php
if(isset($_POST['Text1'])){
$var =$_POST['Text1'];
echo $var;
}
?>
</BODY>
<HTML>
ASKER
ASKER
ASKER
<HTML>
<HEAD>
</HEAD>
<BODY>
<script type="text/javascript">
<!--
function newval()
{
var t="";
for (i=0; i<document.form1.Prices.length; i++)
{
if (document.form1.Prices[i].checked==true)
{
t =t +document.form1.Prices[i].value
}
}
if (t=="")
{
document.getElementById("Text1").value=""
}
else
{
document.getElementById("Text1").value=t
}
}
-->
</script>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="form1">
<INPUT NAME="Text1" TYPE="TEXT" id="Text1" SIZE="20">
Select Service Required:
<INPUT TYPE="radio" NAME="Prices" VALUE="Fully Trackable Courier" onClick="newval()"> Fully Trackable Courier
<INPUT TYPE="radio" NAME="Prices" VALUE="Postal Airmail Service" onClick="newval()"> Postal Airmail Service
<INPUT TYPE="radio" NAME="Prices" VALUE="International Signed for" onClick="newval()"> International Signed for
<input type="submit" name="Submit" id="button" value="Assign">
</form>
<?php
if(isset($_POST['Submit'])){
$var=$_POST['Text1'];
echo $var;
}
?>
</BODY>
<HTML>
ASKER
ASKER
ASKER
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY