What does the $db
variable do and what can I do with it after writing it after the first parameter? I have searched for an answer but your answers are almost always better.
<?php
mysql_connect("localhost", "username", "password");
mysql_select_db("database", $db);
?>
I ask this question because I see people using the $db
tag a lot with representing the database. They do things like for example this: $db->query("SELECT * FROM questions")
or die($db->error);
.