Generate random number 1-10 upon registration without repeat

All right, I figured it out. But if someone wants to suggest something better, please feel free and I will mark it correct. // array of previously-assigned numbers (get this by looping through the registered users -not shown) $numbers_already_taken = array(3,8,1); // get all the numbers between 1-10 $numbers = range(1, 10); // shuffle the … Read more

How to send email verification code for a form?

You need to put together some php & db calls to handle the form submission, generate some unique code for each email and sending the verification code. Below I added a very basic example that can achieve that. It’s not a production ready code but tested and it works just fine. Firstly, you need to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)