I run a small business in which I build very customized computers for home and business users (a lot of gamers, actually), and I want to add some functionality to my website by providing a way for users to have a list of available options, selectable by radio button and divided by category. I then want the price to be updated upon the click of a button.
The problem is, I have almost no idea how to go about doing this. I've moved all of my HTML from the original webpage into acceptable Perl format, but now I've got the issue of creating the CGI to do this. I thought something like the following would be good for where the price actually is stated:
if ($opcost = 0) {
print "Go to the Options section to calculate!";
} else {
print $price;
}
Basically, I want the following:
- A running tally of how much the options will change the original price, i.e., if I get a video card that costs $20 less than the standard, $optioncost -= 20.
- To factor that total tally into $baseprice, the original price.
- I'd prefer to have just one file to work with, rather than an HTML file and a CGI file. I've got the HTML Perlized, so that's not so much an issue.
I've worked some with HTML forms and Perl before, but I do not yet understand how to work with things like radio buttons (what values they return, whether to use POST or GET depending on situation), even though I've read that portion of the Llama. I understand that this should be a pretty simple thing to do, but I need help in assembling the parts and understanding.
Thanks in advance for the help!
Foncé