<a class=“navbar-brand“ href=“https://cdesigner.eu“> Visit us on CDesigner.eu </a>
PHP code grab $_POST submited variables, assign them into php code variables and test its content against filtering rules. First test detect content of all needed values as name, e-mail and mesage text. Next verifies e-mail against rules expected from valid e-mails.
If something is missing or e-mail is incorrect red (bootstrap alerted style) highlight in outputed text is used.
Also our code test sucessfull e-mail sending, if sendig finished correct green message display with text
$msg = ‚Your e-mail has been sent‘; $msgClass = ‚alert-success‘;
if sending was unsuccessful red message is displayed
$msg = ‚Your e-mail was not sent‘; $msgClass = ‚alert-danger‘;
For proper work of this code you must use appropriate webhosting or use XAMPP with runing mercury e-mail server. After enabling mercury through xamp control-panel go to administration and add new user. In our case we used account with name ciljak. local domain aliases that are posible to use are localhost (can not be validate with this code), localhost.net or localhost.org. Next picture show example of mercury enabled features in XAMPP server
For versioning of our code can be used git with github service. Mouch simpler graphical tool for commiting changes and share your code with team is gitkraken https://www.gitkraken.com/. For further reading please wisit next tutorial.
Our project setup screen in gitkraken looks like next picture