Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: use a value form a manu list in a form on the same page

11 views
Skip to first unread message
Message has been deleted

Doug Miller

unread,
Apr 22, 2013, 7:10:31 AM4/22/13
to
newbie php <s.hoi...@gmail.com> wrote in news:0bb368d4-5bd4-4cbb-aeb9-
6962aa...@googlegroups.com:

> Hi all,
>
> I'm so glad you guys helped me out a couple of days ago, so i thought i'd had another go.
> Here's the situation: in a form i want a visitor to choose form a list a value of 1 to 10. This
chosen value should be multiplied by a value of 2750 which should be stored in a variable
and shown on the page (recalculated by any change in the list)
> this value does nog necesarily be in the form itself. The most important question is how to put
the chosen value in a variable.
>
> Any help is greatly appreciated

Do your own homework.

Thomas 'PointedEars' Lahn

unread,
Apr 22, 2013, 8:14:42 AM4/22/13
to
newbie php wrote:

> […]

Get a real name, and learn how to post in a readable way (even via Google
Groups, if absolutely necessary), then we can talk.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300...@news.demon.co.uk>

David Robley

unread,
Apr 22, 2013, 8:37:52 AM4/22/13
to
newbie php wrote:

> Hi all,
>
> I'm so glad you guys helped me out a couple of days ago, so i thought i'd
> had another go. Here's the situation: in a form i want a visitor to choose
> form a list a value of 1 to 10. This chosen value should be multiplied by
> a value of 2750 which should be stored in a variable and shown on the page
> (recalculated by any change in the list) this value does nog necesarily be
> in the form itself. The most important question is how to put the chosen
> value in a variable.
>
> Any help is greatly appreciated
>
> cheers

Check out http://au1.php.net/manual/en/faq.html.php. Of course you'll want
to check whether any values from the list have been passed in when the page
loads, before you do any calculations.

--

Cheers
David Robley

Join the army, meet interesting people, kill them.

Twayne

unread,
May 23, 2013, 4:57:09 PM5/23/13
to
How do you know it's a homework assignment? Or is that just a fecetious
attempt to start flames?

When you have nothing to say, that's exactly what you should say; NOTHING!



Twayne

unread,
May 23, 2013, 4:58:55 PM5/23/13
to
On 4/22/2013 7:10 AM, Doug Miller wrote:
Hmm, another copy-cat. Perhaps some Interpersonal Skills would help you.

Twayne

unread,
May 23, 2013, 5:03:23 PM5/23/13
to
On 4/22/2013 8:14 AM, Thomas 'PointedEars' Lahn wrote:
> newbie php wrote:
>
>> […]
>
> Get a real name, and learn how to post in a readable way (even via Google
> Groups, if absolutely necessary), then we can talk.
>
>
> PointedEars
>

Looks like you're too lazy to bother reading the ng for responses in my
opinion. Putting a real name and address into a ng is a sure way to
assist those who wish to spam/scam and thieves one's identity. Or is
that what you're about? scraping personal ID data?

Lotsa luck, pointed.


Doug Miller

unread,
May 23, 2013, 5:55:00 PM5/23/13
to
Twayne <nob...@spamcop.net> wrote in
news:knlvr8$ma2$1...@speranza.aioe.org:

> On 4/22/2013 7:10 AM, Doug Miller wrote:
>> newbie php <s.hoi...@gmail.com> wrote in
>> news:0bb368d4-5bd4-4cbb-aeb9- 6962aa...@googlegroups.com:
>>
>>> Hi all,
>>>
>>> I'm so glad you guys helped me out a couple of days ago, so i
>>> thought i'd had another go. Here's the situation: in a form i
>>> want a visitor to choose form a list a value of 1 to 10. This
>> chosen value should be multiplied by a value of 2750 which
>> should be stored in a variable and shown on the page
>> (recalculated by any change in the list)
>>> this value does nog necesarily be in the form itself. The most
>>> important question is how to put
>> the chosen value in a variable.
>>>
>>> Any help is greatly appreciated
>>
>> Do your own homework.
>>
> How do you know it's a homework assignment?

Isn't it obvious?

>Or is that just a fecetious
> attempt to start flames?

It got *your* panties in a wad, anyway...
>
> When you have nothing to say, that's exactly what you should
> say; NOTHING!

I *did* have something to say -- "do your own homework" -- and I
said it.

*You*, on the other hand, have not contributed anything useful to
this thread, or, indeed, to any other thread in any other
newsgroup which you have infested -- so I need to add *yet
another* of your constantly-shifting nyms to the killfile.

Buh-bye!

Doug Miller

unread,
May 23, 2013, 5:55:29 PM5/23/13
to
Twayne <nob...@spamcop.net> wrote in
news:knlvuc$ma2$2...@speranza.aioe.org:
Idiot. It's the same post.

Scott Johnson

unread,
May 23, 2013, 6:38:36 PM5/23/13
to
hahahaha....whew...I needed a good laugh, thanks

Denis McMahon

unread,
May 23, 2013, 8:19:31 PM5/23/13
to
On Mon, 22 Apr 2013 03:40:12 -0700, newbie php wrote:

> I'm so glad you guys helped me out a couple of days ago, so i thought
> i'd had another go.

You did? How did that work out for you.

> Here's the situation: in a form i want a visitor to choose form a list a
> value of 1 to 10.

Yeah, in a form if you want the user to choose a number like that you can
use an html select / option, or a set of radio buttons, or you could use
a text input and let the user enter a number, but they might enter a
number outside your range.

> This chosen value should be multiplied by a value of
> 2750 which should be stored in a variable and shown on the page
> (recalculated by any change in the list)

This sounds more like a javascript thing than a php thing, you probably
don't want to submit your form to the server each time the user changes
their option.

> this value does nog necesarily be in the form itself. The most important
> question is how to put the chosen value in a variable.

Not quite sure what a nog is.

Well you'd use an appropriate javascript function to get the value from
the input type that you were using, making sure that you did any needed
conversions to numeric data if it started life as a string value, and
then do the relevant multiplication and display it in a suitable output
location.

> Any help is greatly appreciated

You're welcome.

xp and fu set, this sounds like primarily a js issue, not a php one

--
Denis McMahon, denismf...@gmail.com
0 new messages