Hey fred here is usercheck.php if you didn’t get my e-mail! =)
I did get your email…did you get mine in return? It’s okay if you didn’t, this is much easier!! Let me look at what you have zipped here, then I’ll post again.
Well, here’s the questions I had in that email. That added PHP file that I put in the tutorial’s zip was to add usernames and passwords into your database. I put it there as a conveinience so you wouldn’t have to use a MySQLAdmin or Telnet communication. I use MySQLAdmin to administer my databases - lemme tell ya, it sucks!! Not a fan!!
Anyway, in that script, did you edit it with notepad and change the things you needed to to communicate with your database? If not, I will tell you how. Be advised that you have to change it in two places. If it gets too confusing, I will adjust the PHP script so you only will have to do it once at the top of the script.
In hindsight, probably would have been better for all of you; that script is a working script that I gave to one of my clients to access their database on my MySQL - so I’m sure it works!
Also, tell me what kind of error you are recieving - when you run it from your server in a browser window, does it come up with a parse error? or do the fields show up but it says [COLOR=red]Unable to connect to SQL server!![/COLOR]
Lemme know
Actually, I entered the user/pass/database parts into the file, and I get no errors. However, when I attempt to add a user, I still don’t get any errors, but my user never appears on the list. :goatee:
That’s really wierd. Did you switch them both times? There are two places that require sql connection; one at the begining in the if(_POST) statement; and then again at the bottom to list what you have in the database. Also double check your case sensitivity and spelling. You know, probably as well as I, how one little letter can mess up everything!!
Here’s a working example that you can play with. It’s the test one that I used when making this whole thing for my client, it also is the dbase that the tut’s sample reads from. This link will only be here for a day so I don’t have 372 users and passwords added.
link removed
Do me a favor. On the script that you have replaced your user/pass/database stuff - remove your sql password and username and I’ll take a look at that one, too. It’s gotta be something small.
Here it is. Look for the comments for where I have inserted my information. :cyclops:
You’ve done everything right…I’m not sure why it’s not working. The PHP code is correct. I took your code and put in my info and it does the same thing you’re talking about; however, I put that code next to the one that works and can’t find a difference in the two. It’s reading from the database becuase it tells you how many enteries there are and if you view source on the HTML page, the tables being made which means the PHP script is running correctly.
I’ll look at it some more and get back to you because I’m a little lost on why it’s not working. Sorry!! I’ll get back to you soon.
thx man.
I don’t know what is happening in that script that you had. I’m going to have to download the zip on my tutorial to make sure that it does work from there.
I took the working script off my server and changed it so that all the changes can be made in the beginning of the script rather than throughout. I tested it and it works perfectly.
Usually, when I run into problems like this, it’s due to some minuscule mondane detail like a missing comma or something - I will just scrap everything and try all over again.
Hope this does it for you! Let me know.
you link doesn’t work :crazy:
yeah it does!! Oh well, try this:
http://www.freddythunder.com/amp/amptest.txt
That’ll work!! BTW I just added the ability to delete enteries from the same form. If you get that one working, let me know if you want to add that feature!!
[off topic]
hey freddy, juno whats impossible? Moving your mouse over the letters in your footer and then trying to put them back together.
[/off topic]
IMPOSSIBLE!! - I know I’m talking to you about my new footer, but I had to respond!!
Sorry fred, just one more thing. I think I got it working, but is it possible to get the link for ucssubmit.php again? If not, can I just delete the (form)ucssubmit…)(/form), and still have it work?
Sorry to keep buggin u.
You’re not bugging me at all. - but I don’t understand your question…
Okay, I just looked at what I gave you - yes sorry, definately, you have to change that file name to the one you are on - whatever you called that - I’m so sorry I forgot to tell you about that:
<form action="ucssubmit.php" method="POST">
//change that to
<form action="yourfilename.php" method="POST">
//or
<form action="<? echo ($PHP_SELF); ?>">
//that will just automatically put it the file name that your using
If you still need that link, let me know - I’ll make a working example for you (and future reference). I still have that ‘amp’ directory on my server, so I can put it there - let me know!!
And believe me, I get all kinds of help from other Kirupians when I get stuck on stuff, so now I return the favor - it never bugs me.
I’m confused about what I should put in my “ucssubmit.php” or my own page. Could you re-post that link just for a little bit for me to check the source?
Thx :ninja:
Okay -
http://www.freddythunder.com/ucs/php/ucssubmit.php
You do know that when you view the source, it will be the same code that you have except the PHP will be taken out of it - all you’ll see is the HTML part. PreProcessedHypertext in non-acronym form) Just so you know.
If you need more help, just ask!!:ninja:?