[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

Undefined Function help please

Asked by smphil in PHP and Databases

Tags: undefined, function, call

I got this error on a calendar script I got off line can anyone help me fix this any help would be very appreciated.
PHIL

Fatal error: Call to undefined function: mysql_create_db() in /home/httpd/vhosts/ugofit.com/httpdocs/fitness/admin/makedb.php on line 11


Heres the script and this is line 11
   if (mysql_create_db("$DBName")) {
        print ("Database created successfully...<br>");

FULL SCRIPT BELOW
_______________________________
<?php

$DBhost = "localhost"; // your mysql server...
$DBuser = "ugofit"; // your mysql login
$DBpass = "fitness"; // your mysqlpassword
$DBName = "impcalendar"; // the name of the database used


    $link = mysql_pconnect("$DBhost", "$DBuser", "$DBpass")
        or exit("Could not connect");
       if (mysql_create_db("$DBName")) {
        print ("Database created successfully...<br>");
    } else {
        printf ("Error creating database: %s\n", mysql_error ());
    }
      mysql_select_db("$DBName") or die("Doh!");
      
      $query = "CREATE TABLE `IMP_calendar` (`ID` BIGINT (20) DEFAULT '0' NOT NULL AUTO_INCREMENT, PRIMARY KEY(`ID`)) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `DAY` SMALLINT UNSIGNED ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `MONTH` SMALLINT UNSIGNED ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `YEAR` SMALLINT UNSIGNED ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `TITLE` VARCHAR(50) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `TSTAMP` CHAR(10) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `ASTAMP` CHAR(10) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_calendar` ADD `DETAILS` TEXT ";
      $Doit = mysql_query($query);
      
      $query = "CREATE TABLE `IMP_vars` (`ID` BIGINT (20) DEFAULT '0' NOT NULL AUTO_INCREMENT, PRIMARY KEY(`ID`)) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `BG_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `TEXT_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `DAY_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `DAYNUM_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `TODAY_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `WEEKEND_COLOR` VARCHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `LINK_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `HOVER_LINK_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `TITLE_AREA_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `TITLE_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `WEEKDAY_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `BORDER_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `NIL_DAY_COLOR` CHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `CAL_WIDTH` VARCHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `POP_HEIGHT` VARCHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `POP_WIDTH` VARCHAR(6) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `CODESTRIPPING` TINYINT(2) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `EVENTPOP` TINYINT(2) ";
      $Doit = mysql_query($query);
      $query = "ALTER TABLE `IMP_vars` ADD `SHOWBY` TINYINT(2) ";
      $Doit = mysql_query($query);
      
      print "Tables created...<br>";
      
      $update = " INSERT INTO IMP_vars
      (DAYNUM_COLOR, EVENTPOP, SHOWBY, CODESTRIPPING, TODAY_COLOR, CAL_WIDTH, POP_WIDTH, POP_HEIGHT, BG_COLOR, BORDER_COLOR, TEXT_COLOR, NIL_DAY_COLOR, LINK_COLOR, HOVER_LINK_COLOR, TITLE_COLOR, TITLE_AREA_COLOR, DAY_COLOR, WEEKEND_COLOR, WEEKDAY_COLOR)
      VALUES
      ('666666', '0', '0', '0', 'ffffcc', '500', '400', '400', 'eeeeee', 'ffffff', '666666', 'f9f9f9', '8c93e4', '4c5394', 'ffffff', 'dce2ea', '4d74a9', 'cccccc', 'dce2ea')";
    $doint = mysql_query($update);
      
      print "
      Default values populated...<br>DONE.<p>
      <a href=../calendar.php>Calendar</a><br>
      <a href=../minical.php>Calendar</a><br>
      <a href=adminmenu.php>Admin Page</a>
      ";
      
      
      
      
?>
[+][-]10/07/04 09:43 AM, ID: 12250760Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: PHP and Databases
Tags: undefined, function, call
Sign Up Now!
Solution Provided By: Diablo84
Participating Experts: 3
Solution Grade: A
 
[+][-]10/07/04 09:34 AM, ID: 12250659Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/04 09:34 AM, ID: 12250661Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/04 09:44 AM, ID: 12250765Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/04 02:57 PM, ID: 12254033Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93