Skip to content
Advertisement

PHP form check if fields are empty if not change value in mysql table

Could someone help me with this code!!! So I’m trying to do a change user info part on my website, there’s everything working except the change username part. In this part I have to check if the newUsername is not taken and then change it (if its not already taken), but when I launch my code it doesn’t enter the (else if) statement after the (echo “username deja utiliser”). Can someone explain why it does that and give me a way to correct this problem

JavaScript
JavaScript

Advertisement

Answer

Finally I found something that works. Is this code secure for SQL injection ?

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement