# Passing Vars in Forms - PLEASE HELP!

**URL:** <https://forum.kirupa.com/t/passing-vars-in-forms-please-help/312644>\
**Category:** programming\
**Created:** [August 9, 2010, 9:21pm UTC](https://forum.kirupa.com/t/passing-vars-in-forms-please-help/312644 "2010-08-09T21:21:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiveMeCoffee](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@GiveMeCoffee](https://forum.kirupa.com/u/GiveMeCoffee)\
**Post date:** [August 9, 2010, 9:21pm UTC](https://forum.kirupa.com/t/passing-vars-in-forms-please-help/312644/1 "2010-08-09T21:21:09Z")

</div>

I’m trying to create a php form and I’m having trouble passing some variables (or even just establishing the variable). Below is a sample of the code. ‘name’, ‘email’ and ‘quantity’ are all input/text fields in the form. They all work fine. ‘paperstock’ is the name of a list/menu. The menu works fine - meaning it appears and lets me choose an option - but when I submit the form (which also works) the email I get says ‘undefined’ for that submission.

So the email looks like this:  
Name: Joe  
Email: [Joe@kirupa.com](mailto:Joe@kirupa.com)  
Quantity: 100  
Paperstock: undefined

* * *

```
	var name = $('input[name=name]');
	var email = $('input[name=email]');
	var quantity = $('input[name=quantity]');
	var paperstock = $('input[name=paperstock]');

```

* * *

Should the word ‘input’ be something else like list or something? I just cannot figure this out.

Any help would be very much appreciated.  
If it’s something that takes time I am willing to pay you hourly via pay-pal.

Thank you all in advance.
