$con = mysql_connect("localhost","usernamehere","passwordhere");
//Ok, I think I get this. The variable $con is used when I want to connect to the MySQL DB.
$selectdb = mysql_select_db("user_info",$con);
//This part I am only partially sure on. The user_info should be the table in the My SQL DB that I am trying to get the information from, right?
Actually, it's the database name.
$query = mysql_query("SELECT * FROM usernames");
//Does this make the variable $query an array of all the usernams stored in the user_info table?
No, not really. $query will now be the MySQL resource that will be used to reference your query results from the table named 'usernames' in the database 'user_info'.
while($row = mysql_fetch_array($query)){
//First of all, what is $row supposed to be? Second, how would I echo out the statements for the script I posted earlier?
$row will be a single row of the returned results from the query. I don't know what your table looks like, but it sounds like it just has one column - 'usernames'. To get each of the usernames do something like this:
while($row = mysql_fetch_array($query)){
echo $row[0] . "<br>\n";
}
If you had multiple columns in your table they would be $row[0], $row[1], etc. You could also reference them by their name like $row["username"].
I'm sure you can probably figure out where to put this loop and what to do with it.