Ignore any security for now. I have no need for it until I get this sorted out. I’ve deduced I can logon to the database, but my line in CheckInfo.php of mysql_select_db() is wrong. What’s the issue?
For reference, my DB name is ryanree1_blog and my table name is ryanree1_userSubmitted
Edit-Changed DB name to ryanree1_blog in the config.php file but no go. It’s back to just “blog” now.[/FONT][/COLOR]
No, to me it meant “I copied it from some reliable source in this form so I assume it’s OK and you are wrong.” That’s why it’s better to be specific and not assume your meaning is clear.
It seems a bit odd that the spaces would be removed in a copy-paste anyhow. Are your sure the source code has a space in it? You also have this in your code: [COLOR="#FF0000"]<?php[/COLOR]session_start(); … again a case where a space is needed.
Of course, it may be that none of this is relevant to the issue, but it’s worth pointing out.
I’m positive it’s not an issue. Can we just wait for those who can answer this? Granted this is keeping my thread at the top.
It’s also note worthy that the PHP wouldn’t have allowed it to go so far down the page as to my SQL statement, it surely would have died out from the get-go. I wrote that PHP myself, had I copied it, they would have been sure to make it not crappy and add in some security :).
Has a database named “blog” and user named “ryanree1_reese” been created with permissions to access blog? Normally you would do this by using the command line and running appropriate commands to create the db, user and grant blog permissions to the user. If so than I would recommend double checking the authentication credentials by connecting to MySQL and selecting the db directly via the command prompt. It sounds to me like either the connection is failing because of incorrect credentials or the user does not have permissions to access the database. The first step though is to determine whether a connection to MySQL can be established using the given credentials by eliminating PHP from the equation and using the command line. So verify that first than attempt to use the db to verify that once a connection has been established.
Right now I have PHPmyadmin installed. I created the SQL database via some mysql thing, created a username I could use, and then went to PHP myadmin to create the table.
Then that’s probably it. I went to my admin console yesterday because I thought of that but I didn’t see any option to give rights so I assumed I got it by default. How do I give mydelf access?
Depends a little bit on what version of PHPMA you’re using, but in general:
Go to the ‘server’ level of the breadcrumbs (Usually the “localhost” link at the top).
Click the “Privileges” tab.
Click on the Edit Privileges icon next to the user in question.
Scroll down to “Database-specific privileges”. Add the database in question.
Click the Edit Privileges button next to the database.
Select the relevant privileges (for a regular user access, SIUD should be sufficient.)
Click Go.
Literally foudn it after I posted. It wasn’t there but I found it.
Now I have this error, which corrolates to this PHP line.
Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '‘PostNumber’, ‘Date’, ‘Time’, ‘Content’) VALUES (NULL, ‘2012/02/27’, ‘1330372760’ at line 1
Everything is working now. Well, I may make a new thread if I can’t figure out why my date and time are showing up as just a whole load of 0’s, but anywa thanks to everyone :). Sorry for so many duplicate posts, I just wanted to give updates as I made a breakthrough so that people don’t work on old data.