In the above set of code, we have generated a random number which is then hashed using the md5() hashing technique, and stored in the nonce variable.
The same value is stored in the session too. Once someone opens up the website, the nonce will be generated and will be stored in the unique session of the user, when he submits the form, the nonce will be sent back to the server, which will be validated to see if it matches the original nonce. If it matches, then it is coming from a valid source and if not, it is not from a valid location.
//some mysql transaction code goes here
In the above two files, connection.php and save.php, you can see that the file just needs to be written in require() function and it will get required.
The file connection.php can be required from any other source and can be used to showcase all the connection information from any other machine. For example, anyone can use the global path for the same file to require it in his/her code as below
M/s VIKASH TECH has a team of trained and certified consultants having rich experience in deploying server virtualization solutions offered by VMware, Citrix, Microsoft, Red Hat, ProXMox etc.. While multiple Virtual Machine’s deployment is seen as a challenge in corporate environments, we provide onsite solutions to our clients as well as remote solutions round the clock ensuring high availability of infrastructure at all times…[Read More]
Download our official app from play store and stay tuned with the latest updates over latest blogs, career opportunities and service offerings from M/s VIKASH TECH.