Jump to content

php form


webber09

Recommended Posts

Hi everyone,

 

I'm not sure if this is the right place to ask, but its worth a try. I am wanting to make a form to allow users to get a quote on a certain product, depending on what they put into the form (from pre-made options) depends on the price they are quoted.

 

thanks in advanced to anyone who can help :D

Link to comment
https://forums.phpfreaks.com/topic/173769-php-form/
Share on other sites


<?

if (isset($_POST['submit'])){

$sum=$_POST['addend1'] + $_POST['addend1'];


}

?>

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Math</title>
</head>

<body>
<form action="" method="post">
<table border="0" width="100%">
<tr>
	<td width="72">Addend</td>
	<td><input type="text" name="addend1" value="<? echo $_POST['addend1']; ?>" size="6" /></td>
</tr>
<tr>
	<td>Addend</td>
	<td><input type="text" name="addend2" value="<? echo $_POST['addend1']; ?>" size="6" /></td>
</tr>
<tr>
	<td>Sum</td>
	<td><input type="text" name="sum"  value="<? echo $sum; ?>" size="6" /> 
	<input type="submit" name="submit" value="Answer" />
	</td>
</tr>
</table>
</form>
</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916022
Share on other sites

this is a very quick example of the kind of content I will have.

 

<form>
Required bit rate
<select>
  <option>128kbps</option>
  <option>192kbps</option>
  <option>240kbps</option>
  <option>320kbps</option>
</select><br />
Required listener ammount
<select>
  <option>up to 100</option>
  <option>up to 200</option>
  <option>up to 400</option>
  <option>400+</option>
</select><br />
Auto DJ? 
<select>
  <option>Yes</option>
  <option>No</option>
</select>
</form>

 

what i need is from the form to detect the value selected in the <option> and depending on which are selected, add a set amount of money for each <option> and give a final total at the end =]

Link to comment
https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916031
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.