justanewb Posted February 27, 2009 Share Posted February 27, 2009 Ok so I have all my scripts done and I have my database made. This is where the problem comes in. I have made a text based game but you cannot register an account. It's like it wont connect to the database someone told me I had to edit the config.inc file to match my database settings but there is no config.inc. Please I just want to be able to register lol. Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/ Share on other sites More sharing options...
MatthewJ Posted February 27, 2009 Share Posted February 27, 2009 Hard to help when you don't post the code. Would you like someone to guess? Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/#findComment-772530 Share on other sites More sharing options...
justanewb Posted February 27, 2009 Author Share Posted February 27, 2009 Ill paste half of dbinstall. It exceeds 4000 words. I'm pretty sure there is an error in first line. At least that's what it tells me. $db = mysql_connect("-----","------","-------"); mysql_select_db("-----",$db); CREATE TABLE og_addturns ( lasttime int(20) default NULL, id int(11) NOT NULL auto_increment, PRIMARY KEY (id) ) TYPE=MyISAM; LOCK TABLES og_addturns WRITE; INSERT INTO og_addturns VALUES (1013030594,1); UNLOCK TABLES; DROP TABLE IF EXISTS og_bounty; CREATE TABLE og_bounty ( victimid int(10) NOT NULL default '0', posterid int(10) default NULL, acceptorid int(10) default '0', noofthugs int(50) default NULL, nothugskilled int(50) default '0', price float(10,2) default NULL, stateid int(10) default NULL, accomplish date default NULL, id int(10) NOT NULL auto_increment, PRIMARY KEY (id), KEY victimid (victimid) ) TYPE=MyISAM; # # Dumping data for table 'og_bounty' # LOCK TABLES og_bounty WRITE; UNLOCK TABLES; # # Table structure for table 'og_cafe' # DROP TABLE IF EXISTS og_cafe; CREATE TABLE og_cafe ( message blob, state int(10) default NULL, fromid int(10) default NULL, posted timestamp(14) NOT NULL, id int(10) NOT NULL auto_increment, PRIMARY KEY (id) ) TYPE=MyISAM; # # Dumping data for table 'og_cafe' # LOCK TABLES og_cafe WRITE; UNLOCK TABLES; # # Table structure for table 'og_cartelboard' # DROP TABLE IF EXISTS og_cartelboard; CREATE TABLE og_cartelboard ( sent timestamp(14) NOT NULL, message blob, cartel int(10) NOT NULL default '0', fromid int(10) default NULL, id int(10) NOT NULL auto_increment, PRIMARY KEY (id) ) TYPE=MyISAM; # # Dumping data for table 'og_cartelboard' # LOCK TABLES og_cartelboard WRITE; UNLOCK TABLES; # # Table structure for table 'og_cartelinfo' # DROP TABLE IF EXISTS og_cartelinfo; CREATE TABLE og_cartelinfo ( cartelname varchar(250) default NULL, hometown varchar(250) default NULL, state int(10) default NULL, money float(100,0) default '0', crackrocks float(100,0) default NULL, smack float(100,0) default NULL, thugs float(100,0) default NULL, glocks float(100,0) default NULL, tek9s float(100,0) default NULL, uzis float(100,0) default NULL, aks float(100,0) default NULL, cartelcut float(4,2) default NULL, cid int(10) NOT NULL default '0', coid int(11) default '0', leaderid int(10) default NULL, networth float(100,2) NOT NULL default '0.00', donations int(1) default '0', id int(10) NOT NULL auto_increment, PRIMARY KEY (id), KEY cid (cid), KEY networth (networth) ) TYPE=MyISAM; # Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/#findComment-772591 Share on other sites More sharing options...
Mark Baker Posted February 27, 2009 Share Posted February 27, 2009 Yes, the error is that you're confusing SQL statements with PHP code, and assuming that SQL will automatically execute simply because without the need to use a mysql_query() PHP function. Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/#findComment-772598 Share on other sites More sharing options...
shadiadiph Posted February 27, 2009 Share Posted February 27, 2009 looks like you have to create a table for your users so they can register Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/#findComment-772601 Share on other sites More sharing options...
justanewb Posted February 27, 2009 Author Share Posted February 27, 2009 Great I thought I had already done that.. Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/#findComment-772852 Share on other sites More sharing options...
shadiadiph Posted February 27, 2009 Share Posted February 27, 2009 sorry dont know couldnt see any username password or email field in a table for your users Link to comment https://forums.phpfreaks.com/topic/147148-im-stuck-please-help/#findComment-772859 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.