New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
[solved-myself] Php mysql insert problem
//solved - mysql crashed lol before it inserted
Problem with insert: Access denied for user 'root'@'localhost' (using password: NO)
php connect via:
mysql_connect("localhost", "root", "root") or die(mysql_error());
mysql_select_db("databasename") or die(mysql_error());
in ssh i can do "mysql -uroot -proot" and works
why php can not insert into mysql?
Comments
Just saw this after your comment about mysql running out of connections, PM me what your trying to do and I'll try to assist in doing it better
On a side note, mysql_connect is deprecated in php 5.5+ and removed from php 7, I suggest you use mysqli instead, even if it's only for testing purposes...
Did you guys not see the edit ?
When we skim through LET, there's a decent chance that we don't see edits. Plus, it's not like people who post in this thread get a notification of your edit.
if anyone would have such a problems like me do the following:
edit php.ini and edit -> and set ->
If they read it fully, they would've seen the OP's edit. I was just pointing out that editing a post doesn't make it so the page updates with the new information if the person visits the page before it happens.
To address your last statement: I have my freedoms and so do you. There is something called "freedom of speech" - I have the right to say whatever I wish unless it is either 1) against the LET rules or 2) against the law.
SMH. Nevermind
@Junkless Suit yourself.
>
Best way is to start usnig PDO statements, much more flexibility for various database engines, and much more secure functionality.