My code is not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

My code is not working

https://sololearn.com/compiler-playground/wUn80TWCAT8I/?ref=app When I echo $sql , it don't get print. And connectivity with database is also no problem. In test.php with database name with username , password column of user table. Please help me . Not understanding why code is not working and even is not showing

8th Dec 2023, 3:13 PM
Om Yele
Om Yele - avatar
6 Answers
+ 1
Thankyou bro for suggestions. I will try it to fix it with your suggestion. Is there any more error in the code
8th Dec 2023, 6:09 PM
Om Yele
Om Yele - avatar
+ 1
i'm not a developer yet, but i'm on my way, i was just testing your code and reviewed it, i'll be following you!
8th Dec 2023, 6:42 PM
Ronaldo
Ronaldo - avatar
0
there is an issue with how you are handling the form action in the "action" attribute, currently, you are using "<?php $_SERVER['PHP_SELF']; ?>", but you are neither printing nor assigning this value to anything, you need to use "echo" to print the value and, furthermore, assign it to the "action" attribute of the form (<?php echo $_SERVER['PHP_SELF']; ?>). Additionally, there is another problem with the type of button you are using, you should change "type="button" " to "type="submit" " so that the form submits correctly when you click the button psdt: tell me if I was able to help you (sorry if i made any grammar mistakes, i'm not very good at english)
8th Dec 2023, 6:05 PM
Ronaldo
Ronaldo - avatar
0
i've reviewed it a couple of times, and i've only come across the ones i mentioned above, but i hope i've helped you with those
8th Dec 2023, 6:17 PM
Ronaldo
Ronaldo - avatar
0
Are you a web developer. Can I get your number. if you don't mind?
8th Dec 2023, 6:18 PM
Om Yele
Om Yele - avatar
0
It (your suggestion) worked bro , lovely . Thankyou very much bro.
8th Dec 2023, 6:24 PM
Om Yele
Om Yele - avatar