Another major module in programming languages is sending variables from one page to another page. Usually, for many reasons we need to send some data on one page to be shown on another page. There are two major ways to send variables from one page to another page.
Using HTML forms is used only if there is some form processing required, but mostly we need variables to show data classification to users. Suppose, we need to see the products in a particular category, then in product page, we need the name of the category or some thing to classify the data.
And we can send variables embede within the anchor tags
We can then retrieve these variable values on target page by using $_GET or $_REQUEST constructors in PHP. However, for security reason, always process data for sql injection or cross-site scripting vulnerabilities.
- Sending variables by using forms.
- Sending variables without forms.
Using HTML forms is used only if there is some form processing required, but mostly we need variables to show data classification to users. Suppose, we need to see the products in a particular category, then in product page, we need the name of the category or some thing to classify the data.
And we can send variables embede within the anchor tags
Variables are embeded in URL |
No comments:
Post a Comment