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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.