Using PHP to code & validate web forms |
For example, instead of updating a footer element on each page of a ten page site - just create a footer.php page and write your footer. Then, call the footer on each web page using a PHP include statement. Very cool way to do mass updates and changes. I learned that the same process can be used to create a header.php, nav.php and top.php pages. This process ensures that each page is structured the same way.
CSS stands for Cascading Style Sheets. CSS is what makes webpages look great - color, fonts, design and layout. A fun website to see how CSS works is to explore csszengarden.com. On this site, all of the content is the same, but the CSS gives each example a unique look. CSS is very powerful and a creative way to style the web and improve the user experience.
This past week, we've been using PHP to validate our forms, sanitize and check our data for errors and return a confirmation statement or error - with an array to list those errors.
Check out the error functionality I created using PHP code:
https://wbohmann.w3.uvm.edu/cs008/assignment3.1/form.php
The PHP coding for form validation took over 10 hours to write and included more than 300 lines of code. This has been a challenging class with UVM - mostly due to the PHP. However, I've been learning a lot about creating more functional websites. For my final project, I plan to create a website for my summer food truck - StreetGreens.
No comments:
Post a Comment