Newsletter PHP

I am having problems with this program.  @ this line if (mysql_create_db($DBName, $DBConnect) === FALSE)

The error is
( ! ) Fatal error: Call to undefined function mysql_create_db() in C:\wamp\www\9780538745840_Data\PHP_Projects\Chapter.08\Chapter\CreateNewsLetter.php on line 19

Can you help me?

<html xmlns="">
<title>Create Newsletter Database</title>
<meta http-equiv="content-type"
      content="text/html; charset=iso-8859-1" />
$DBName = "newsletter";
$DBConnect = mysql_connect("localhost", "root", "");
if ($DBConnect === FALSE)
      echo "<p>Connect error: "
            . myqsql_error() . "</p>\n";
            if (mysql_create_db($DBName, $DBConnect) === FALSE)
                  echo "<p>Could not create the \"$DBName\" " .
                  "database: " . mysql_error($DBConnect) .
                  echo "<p>Successfully created the " .
                        "\"$DBName\" database.</p>\n";

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I believe you are looking to use mysql_select_db as that is a real function and mysql_create_db is not.
Tho it appears you are looking to create a DB so  you would issue a query for that:

if( mysql_query("CREATE DATABASE $DBName") ) {
assaultkittyAuthor Commented:
Why do I have to use these function?  Are they deprecated function?
Look at the error you get - mysql_create_db IS NOT a function in php. Unless you were define it as such, which, again, according to your error you haven't. I'm providing you with options that work with functions built into PHP already.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
assaultkittyAuthor Commented:
Very fast response.  Thank you!!!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.