Forms, Variables, and REQUEST - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Forms, Variables, and REQUEST

nathansizemorenathansizemore Posts: 2Member
First, I am uber fresh to PHP and HTML. First time looking at the languages so please bear with me because I am sure I will be flooding the PHP Forum with ridiculously stupid questions until I get a grasp of what PHP is all about...
So, that being stated, I did try and search the forum with 'form request' before I made this topic, but the site gave me an error, hence this post.

What is the deal with globals in PHP? My ini files has arrays ok in get and post, but variables are turned off? Before I turn them on, let me give you a background on what I am trying to accomplish...
I am wanting to create a form for users to enter information in and PHP will take that information and store it into a database. Currently have a WAMP stack. Now, if I have globals turned on, if more than one user is entering data, wouldn't that create confusion as to which user the globals get information from? Assuming more than one hit the 'submit' button at the same time?
Now, onto my immediate questions:
This is my test code:

Zip code:

$zipCode = $_REQUEST["zipCode"];
print "zip code - $zipCode";
When I click 'Submit', the next page displays nothing. I have a PHP/MySQL book, and it states that if globals are turned off, you can place this:
$zipCode = $_REQUEST["zipCode"];[/code]
At the beginning of the PHP file, and it will work. Well, it doesn't. How do I make things display? Or what I feel is going on, is my variable is not receiving a value, so it displays nothing...?
Thanks in advance!
Sign In or Register to comment.