![]() ![]() Don’t memorize all the characters, just remember the functions to deal with them. Just Kidding! You do not have to memorize this table, there are much better things to do with your time! In fact let’s start making good use of that time by talking about the built in functions in PHP that will do this for you. Ok, we know there are quite a few characters to be aware of, so go ahead and memorize the table above, then come back once you’re ready to continue working with URLs in PHP. The solution is that instead of using the actual character in the URL, you should use the the equivalent percent sign hexadecimal digits encoding value in the URL. So as you can see, there are quite a few characters that could cause problems for you. This table contains the reserved html characters we need to be aware of. ![]() In HTML there are some reserved characters that we must be aware of because if we include them in a query string without the proper encoding, the URL will break. ![]() Working With GET and Links in PHP Page OneĬool! By passing in values to the variables in the query string, we are able to pass data from one page to another via the GET Super Global variable. One with a link to page two, and the other with some logic to dump the contents of the GET Super Global Variable to the screen. The classic example of how to explain the way the GET Super Global and html links work together is by creating two html pages and creating links between them to show how the data is passed. The query string is the part of the URL that comes after the domain. When we’re working with URL’s and Links in PHP, we can pass variables via the URL itself in the form of a query string. Let’s jump right in to working with URLs, Links, and PHP. The concepts here are in use all over the internet on virtually every website you’ll ever visit. Some other key points will be to learn what the reserved characters in URLs are, what characters are unsafe, and when and how we’ll need to encode them for proper use. Specifically, we’ll need to learn what a $_GET variable is, and how it works in combination with URL parameters. In this PHP Tutorial Series, we’re going to take a look at how to generate links using PHP so that we can include variable data via URLs and Super Globals. ![]() As we have seen, when working with PHP, it is going to be common and necessary that we process data and information using variables. We’ve covered a lot of technical detail concerning dealing with hyperlinks in HTML here at VegiBit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |