Well, from first glance, assuming whatever it is you're doing with if($_POST['check']) (you should've posted the form code as well) is okay, you might have a problem with your blocks. |
|
Ok, basically im trying to make a script that will, if the information exists in the database that the users entered into the 2 fields, it will echo out the entered username/pass combo so that a user can edit it. but im having trouble just getting the information to show up. Heres the script I got so far, and it LOOKS fine to me, but obviously isn't otherwise it would work. and please, don't criticize me too much, Im new to this, and know theres going to be some mistakes that some of you smarter users wouldn't make, I just need to know whats wrong, why its wrong, and how to fix it if you will. I removed the table name and replaced it with 'tablename' instead... im just paranoid (don't ask): |
|
Well, from first glance, assuming whatever it is you're doing with if($_POST['check']) (you should've posted the form code as well) is okay, you might have a problem with your blocks. |
|
Alright, I'll give that a go and see what works. Anyway, the form code is just this: |
|
Well, for the first part, you should use: |
|
well, to be quite honest, I was approached by a friend who wanted me to do it for him, but I became stuck and couldn't figure it out. |
|
No, where doesn't use brackets. |
|
well, what I would like it to do, is make it kind of like a login script: |
|
That's exactly what the query I provided will do. |
|
|
|
I forgot the echo. Was going to add something else but left it out along with it. Ignore the php tags and imagine the echo...aye. |
|
Aye, and the password should technically be encrypted. You'll probably want: |
|
I originally had it stored as md5, but undid it for the echo thing so that I could see what password it was putting out for sure. |
|
Aye, that was just a loose example. Use that query and place variables in it when in the script. Get your mind thinking along the track of how it's supposed to work. |
|
Ok well I don't have time to do that tonight, but I'll give it a go in the morning and hope for the best. |
|
Bookmarks