![]() ![]() That's where the PHP at the top of your document comes into play. That means that the form will be submitted to the current page. These variables can be passed by using a web form using the post method or it can be an application that sends. Note that the form's action is left blank. The POST is an associative array of variables. Example 1 A simple array 'bar', 'bar' > 'foo', ) // Using the short array syntax array 'foo' > 'bar', 'bar' > 'foo', > The key can either be an int or a string.That means a page (say, index.php) that looks generally like this: MVC men will likely put out a hit on me for saying this (if they haven't already), but I like to keep this kind of thing self-contained. If the user is submitting, say, a value from a dropdown menu/list of radio buttons, you could check to see if the $ages array has that year set, and if not, display a default message: $year = $_GET Įcho isset($ages) ? $ages : 'DOES NOT COMPUTE' I feel like I need to add in another If/Else for if high or too low. If their too high, it shows a page saying that, if too low it shows an error as well. If(array_key_exists($_GET, $ages))īasically trying to have it setup where I can get the movie input to choose a random title and display it in the input field for "movie", then a user has to guess the year it was made. I think im creating an associative array with the username (rowbert) as the key. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |