think tank forum

technology » evaluate my PHP

asemisldkfj's avatar
17 years ago
link
asemisldkfj
the law is no protection
this is the first PHP I've written that interacts with a MySQL database. let me know of any suggestions you have!

I have a feeling this isn't going to look so hot if I paste it here, so here it is on my server: http://thehomerow.net/~brain/update.txt .
asemisldkfj's avatar
17 years ago
link
asemisldkfj
the law is no protection
for some reason the auth section isn't working properly. I haven't had a chance to look at it yet today and try to fix it, but hopefully I will tonight.
lucas's avatar
17 years ago
link
lucas
i ❤ demo
know what i just learned? php has a global array called $_REQUEST[] that is automatically populated with $_GET, $_POST, and $_COOKIE.
asemisldkfj's avatar
17 years ago
link
asemisldkfj
the law is no protection
as usual, it was a silly mistake. I had the if statement testing PHP_AUTH_USER != username && PHP_AUTH_PW != password. just had to replace && with ||.
lucas's avatar
17 years ago
link
lucas
i ❤ demo
sorry i didn't reply. i took a quick glance and that looked kinda odd to me
asemisldkfj's avatar
17 years ago
link
asemisldkfj
the law is no protection
no problem. took me all of two minutes to fix.