Sponsored Content
Full Discussion: PHP Help with Form Submit
Top Forums Shell Programming and Scripting PHP Help with Form Submit Post 302300893 by nck on Wednesday 25th of March 2009 10:14:05 AM
Old 03-25-2009
PHP Help with Form Submit

Hi,

I have a custom HTML form that has a couple radio buttons and a text field that requires a number.

I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number.

-------------------------------
Here is a snippet from the form:
<input value="$1.20 standard design" class="radio radio radio" id="$1.20 standard design" name="radio2" type="radio" />
<label for="$1.20/standard_design" class="radio_label">$1.20/standard_design</label>

<input value="$2.10 extended_design" class="radio radio radio" id="$1.20 standard design" name="radio2" type="radio" />
<label for="$2.10/extended_design" class="radio_label">$2.10/extended_design</label>

<div class="form_element cf_textbox">
<label class="cf_label">Quantity to order? *</label>
<input class="cf_inputbox required validate-number" maxlength="150" size="30" id="text_27" name="text_27" type="text" />
</div>
-------------------------------

I need PHP code to take one of the Radio button values and then multiply it by the Quantity, then from the the discount table apply the appropriate discount and save the total in a variable.

Quantity Discount table is:
50-99 10% Off 400-799 40% Off
100-199 20% Off 800-1999 50% Off
200-399 30% Off 2000-4999 60% Off

I appreciate any help with this.
Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using wget to submit a form on linksys router

I'm trying to use wget to submit a form. I have tried to dig out what is actually being "posted" and where, using tamperdata (see below). http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127 Here is my wget command: wget --http-user=xyz --http-password=xyz... (1 Reply)
Discussion started by: mike909
1 Replies

2. Shell Programming and Scripting

Form validation in PHP

My form validation script looks like this of the form like this.... <html> <form method="POST" action=""> <table > <tr> <td >Name:</td> <td ><input type="text" name="name" size="30%"></td> </tr> <tr> <td >Phone:</td> <td ><input type="text" name="phone" size="30%"></td> </tr>... (0 Replies)
Discussion started by: gameboy87
0 Replies

3. Web Development

Attachement Form Mail in php

Dear Sir, I have used a php form mail code in a website. The problem I am facing is: the text in mail body is getting injected to a configured yahoo mail ID, but no attachement file. I need the attachement to go to the configured yahoo mail ID. The code I have used : <?php ... (1 Reply)
Discussion started by: swapan
1 Replies

4. Shell Programming and Scripting

Using cURL to submit a post form

I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php . I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
Discussion started by: hansvg
2 Replies

5. Shell Programming and Scripting

Can't submit a form.

hello my script is submitting POST-data to a site (its not my first script, i've done these before many times (include parsing scripts) but this one is tough) so the problem is i'm submitting a form with firefox and in firebug i see WHAT exactly i'm submitting then when i do EXACTLY the... (28 Replies)
Discussion started by: tip78
28 Replies

6. UNIX for Dummies Questions & Answers

How to submit form on an php webpage from command line?

Hello, i have page domain.com/form.php the form fields on form.php are named: name=ipaddress name=port and submit button is named: submit i want to ask how the linux command will look like to submit the form filled with: ipaddress: 127.0.0.1 port: 80 I tried various curl and... (5 Replies)
Discussion started by: postcd
5 Replies

7. Web Development

Php help to copy form field if empty

I have an input form with several fields. What I would like to achieve is to auto populate or copy certain fields if they are empty when the form is submitted. I would like to use php if not then javascript but not jquery if possible - I have sort of had a go but I really have no idea... (4 Replies)
Discussion started by: barrydocks
4 Replies

8. Programming

Html form to submit data to bash script

hi all, im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the... (3 Replies)
Discussion started by: robertkwild
3 Replies

9. Shell Programming and Scripting

Exec submit form in bash script

Hi All, I'm new in forum. Many congratulations to everyone for all work. I'm not an expert in bash script I've a problem with a sh file. The sh file run every t minuts and it read data from txt file and then compile form. Finally, the user, from the web browser click on send. The script... (0 Replies)
Discussion started by: Herbert
0 Replies

10. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies
Gtk2::RadioButton(3pm)					User Contributed Perl Documentation				    Gtk2::RadioButton(3pm)

NAME
Gtk2::RadioButton - wrapper for GtkRadioButton SYNOPSIS
# first group $foo1 = Gtk2::RadioButton->new (undef, 'Foo One'); $foo2 = Gtk2::RadioButton->new ($foo1, 'Foo Two'); $foo3 = Gtk2::RadioButton->new ($foo2, 'Foo Three'); # second group, using the group reference $bar1 = Gtk2::RadioButton->new (undef, 'Bar One'); $group = $bar1->get_group; $bar2 = Gtk2::RadioButton->new ($group, 'Bar Two'); $bar3 = Gtk2::RadioButton->new ($group, 'Bar Three'); # move bar3 from the bar group to the foo group. $bar->set_group ($foo->get_group); # iterate over the widgets in the group $group = $foo1->get_group; foreach my $r (@$group) { $r->set_sensitive ($whatever); } DESCRIPTION
A single radio button performs the same basic function as a Gtk2::CheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right. Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A Gtk2::RadioButton is one way of giving the user a choice from many options; Gtk2::OptionMenu and Gtk2::ComboBox (added in gtk+ 2.4) are alternatives. Each constructor can take either a group or widget from that group where the group is wanted; this is an enhancement over the C API. Nevertheless, the _from_widget forms are provided for completeness. HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Bin +----Gtk2::Button +----Gtk2::ToggleButton +----Gtk2::CheckButton +----Gtk2::RadioButton INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable Gtk2::Activatable METHODS
widget = Gtk2::RadioButton->new ($member_or_listref=undef, $label=undef) o $member_or_listref (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. o $label (string) Create a radio button. If $label is provided, it will be interpreted as a mnemonic. If $member_or_listref is undef, the radio button will be created in a new group. widget = Gtk2::RadioButton->new_from_widget ($group, $label=undef) o $group (Gtk2::RadioButton or undef) o $label (string) widget = Gtk2::RadioButton->new_with_label ($member_or_listref=undef, $label=undef) o $member_or_listref (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. o $label (string) Create a radio button with a plain text label, which will not be interpreted as a mnemonic. widget = Gtk2::RadioButton->new_with_label_from_widget ($group, $label=undef) o $group (Gtk2::RadioButton or undef) o $label (string) widget = Gtk2::RadioButton->new_with_mnemonic ($member_or_listref=undef, $label=undef) o $member_or_listref (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. o $label (string) Create a radio button with a mnemonic; this is an alias for "new". widget = Gtk2::RadioButton->new_with_mnemonic_from_widget ($group, $label=undef) o $group (Gtk2::RadioButton or undef) o $label (string) arrayref = $radio_button->get_group Return a reference to the radio group to which $radio_button belongs. The group is a reference to an array of widget references; the array is not magical, that is, it will not be updated automatically if the group changes; call "get_group" each time you want to use the group. $radio_button->set_group ($member_or_listref) o $member_or_listref (scalar) reference to the group or a Gtk2::RadioButton belonging to that group. Assign $radio_button to a new group. PROPERTIES
'group' (Gtk2::RadioButton : default undef : writable / private) The radio button whose group this widget belongs to. SIGNALS
group-changed (Gtk2::RadioButton) SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button, Gtk2::ToggleButton, Gtk2::CheckButton COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.14.2 2012-05-27 Gtk2::RadioButton(3pm)
All times are GMT -4. The time now is 04:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy