Wrox Programmer Forums
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2006, 03:21 PM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Quote Form

I need to create a quote form for an insurance company which will have a few different criteria, "************, smoking, and age" based on these values i want it to return a price. Is this something difficult to do and if its not can someone please point me in the right direction on how to do this. I appreciate any help.
 
Old April 20th, 2006, 02:26 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

On the page where you receive variables from a form on another page, just use them to calculate the price.

I don't know how you calculate it, so I cannot show an example, but from the form you would probably get three values:
 $_POST ['************'], $_POST ['smoking'], and $_POST ['age']. Then use them.

How to transfer variables from one page to another, I tried to explain on this thread:
http://p2p.wrox.com/topic.asp?TOPIC_ID=42691

You will have to use the drop-down menus probably, like this:
Code:
<select name="************"><option value='1'>Female</option>
<option value='2'>Male</option></select>
or adding the empty choice:
Code:
<select name="************"><option value='0' selected='selected'>-Choose-</option>
<option value='1'>Female</option>
<option value='2'>Male</option></select>
 
Old April 25th, 2006, 06:02 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could even do it in javascript.





Similar Threads
Thread Thread Starter Forum Replies Last Post
single quote problem harpua PHP Databases 1 July 8th, 2005 07:37 AM
Quote Form using an Array - Help jgisler Beginning PHP 1 July 8th, 2003 04:41 PM
Stock Quote JonnyRPI Classic ASP Basics 1 June 3rd, 2003 09:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.