avatar.alex Posted March 24, 2007 Share Posted March 24, 2007 im having troble with crating the table using the script. I press submit and it doesnt do anything i checked to see if the tables were created but they werent I did what the directions did. Here they are: #################################### # PhotoRate v2.0 # Nuked Web Services # http://nukedweb.memebot.com/ #################################### There are only a few simple steps to get PhotoRate up and running... 1. Open config.php and enter your MySQL information in the first 4 blank variables. You can leave the table name as the default setting unless you really need to change it. 2. Save config.php and upload all the files from the zip, to your site, keeping the directory structure intact. 3. Using your FTP client, change the directory of the PICS folder to allow write access by PHP. This can be done using CHMOD 767, but you may need to use 777 depending on your webhost's server configuration. 4. Access create_table.php through your web browser, and follow the directions on that page. 5. Access index.php where you uploaded PhotoRate, and upload your first picture! If you need to change the design and appearance of PhotoRate, you will most likely need an HTML editor such as Macromedia Dreamweaver, or similar. You can open and edit template.html to change the design of the main page. Optionally, you can do the same to new.php to change that page's design. If you'd like to change other variables in config.php, those vatriables have been commented to describe what they do. I did everything in the directions but it doesnt creat the table. Please help me heres the code. <? include "./config.php"; if ($create){ $sql = "CREATE TABLE `$table` ( `id` int(11) NOT NULL auto_increment, `email` varchar(255) NOT NULL default '', `aim` varchar(20) NOT NULL default '', `icq` varchar(20) NOT NULL default '', `yahoo` varchar(255) NOT NULL default '', `homepage` varchar(255) NOT NULL default '', `vote_a` int(11) NOT NULL default '0', `vote_b` int(11) NOT NULL default '0', `vote_c` int(11) NOT NULL default '0', `vote_d` int(11) NOT NULL default '0', `vote_e` int(11) NOT NULL default '0', `picfile` varchar(255) NOT NULL default '', `dt` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ;"; $result = mysql_query($sql) or die("Failed: $sql - ".mysql_error()); print "The MySQL table <b>$table</b> has been created and PhotoRate is ready for use! I highly suggest that you now delete <b>create_table.php</b> before you continue. "; exit; } ?> <p>This script will automatically create the MySQL tables for PhotoRate. <b>You MUST edit config.php before this script can be run</b>. The 'Create Table' button will appear below if you've successfully given all the info needed to do this. Please review the info below just to be sure:</p> <p>Database Host: <? print $sqlhost; ?><br> Database Login: <? print $sqllogin; ?><br> Database Password: <? print $sqlpass; ?><br> Database Name: <? print $sqldb; ?><br> MySQL Table Name: <? print $table; ?> <br> <br> <br> If this is all correct, click the 'Create Table' button below. If the button does not show below, it's because one of these fields are empty.</p> <? if ($sqlhost && $sqllogin && $sqlpass && $sqldb && $table)print "<form name='form1' method='post' action='create_table.php'> <div align='center'> <input type='hidden' name='create' value='1'> <input type='submit' value='Create Table!'> </div> </form>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/44177-solved-create_tablephp/ Share on other sites More sharing options...
cmgmyr Posted March 25, 2007 Share Posted March 25, 2007 can you please post how you solved this incase others need it? Quote Link to comment https://forums.phpfreaks.com/topic/44177-solved-create_tablephp/#findComment-214538 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.