Dynamic Web Pages
Dynamic Web Pages require a programming language to come to life. That programming language is going to be executed either on your computer or the server’s computer, but either way, it needs a processor to make things happen. The best way to explain a dynamic page is to demonstrate one.
This page is dynamic. Notice the extension of the file is .php, which means it has PHP code embedded. So, let's do something simple, like show the current date and time.
It is Saturday December 14, 2019 at 2:10 pm EST
Here is the code:
<?php echo "It is " . date("l F j, Y \a\\t\ g:i a") . " EST"; ?>
The PHP code has now made this page come to life and interact with the world, in this case, go out and find out the time and display it to you.
The advantages of dynamic pages is that you can add a feature to your website, such as a Contact Us page, or automatically expiring upcoming event information after the day of the event has passed.
But Dynamic Pages should only be created when necessary as there is much more to consider:
- There is more labor involved with the writing, testing, and securing of the code
- It must be maintained over time to ensure it continues to work and remains secure
- It can be hacked, such as sending 100 emails by submitting a contact us form 100 times, so there is substantial code that takes care of securing the page
Adding dynamic pages can add some time and budget, but can be a way to make your website shine.