Jump to content

function not adding table when user register


asucrews

Recommended Posts

The function not adding the table to my database...and i not sure why it not...anyideas?

 

Function in Questions

<?php
   public function addNewUser($username, $password, $email, $animelist){
      $time = time();
      /* If admin sign up, give admin user level */
      if(strcasecmp($username, ADMIN_NAME) == 0){
         $ulevel = ADMIN_LEVEL;
      }else{
         $ulevel = USER_LEVEL;
      }
      $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '0', $ulevel, '$email', $time, '$animelist')";
      return mysql_query($q, $this->connection);
      $q2 = "CREATE TABLE ".$animelist."(`id` int(4) NOT NULL auto_increment,`title` varchar(50) NOT NULL,
  `studio` varchar(50) NOT NULL,`yearmade` year(4) NOT NULL,`uslicensed` varchar(50) NOT NULL,`yearuslicensed` year(4) NOT NULL,`media` varchar(5) NOT NULL,`episodes` varchar(3) NOT NULL,PRIMARY KEY  (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
      return mysql_query($q2, $this->connection);
   }
php?>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.