$connect = mysql_connect("localhost","peter","abc123")
$db=mysql_select_db($dbname,$connect) or die("Unable to connect to db");
$result = mysql_query($sql, $conn)or die("Unable to query dbl");
This is my first ever post here. I'm on chapter 6 of a 17 page
PHP4 book and I'm not understanding some minor things here
and there.
I did a ColdFusion site as a project several years ago and I still
think that was super easy to learn from the book I had, however,
no one loves ColdFusion so now I have to go along to get along.
Question:
Why do we put the connection into a variable? I'm thinking you
tell the system to connect and it stays that way till you end it or
it times out.
I also don't know why we put the above second code line and
above thrid line into a variable.
I might never get it and just have to live with it, but if I had to
teach this to someone one day, I would rather like to have an
answer better than "Because that's the way it is."
Thanks in advance guys