Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Check this script??? I know its Bad.

  1. #1
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Check this script??? I know its Bad.

    Hey guys... I just through a script together really quick. can you check it out... Dosent seem to work...




    Code:
        <form method='post' action='install.php?step=1'>
        <table>
        <tr>
          <td>MySQL User:</td>
          <td><input type='text' name='muser' size='20'></td>
        </tr>
        <tr>
          <td>MySQL Password:</td>
          <td><input type='text' name='mpass' size='20'></td>
        </tr>
        <tr>
          <td>MySQL Database:</td>
          <td><input type='text' name='mdata' size='20'></td>
        </tr>
        <tr>
       
         <td>Make sure all the above info is correct.</td>
           
          <td><input type='submit' name='submit' value='Submit'></td>
        </tr>
        </table>
        </form>";
    
        
    
         }else{
        $muser = $_POST['muser']; $mpass = $_POST['mpass'];
        $mdata = $_POST['mdata']; 
        
        if(empty($muser) || empty($mpass) || empty($mdata) ||{
          Echo"<b>Error:</b> You have some boxes with No info in them, You MUST fill in EVERY BOX!";
          die();
        }
    
    // Connect to Check
        mysql_connect ("localhost", "$muser", "$mpass") or die(mysql_error());
        mysql_select_db ("$mdata");
    
        // Create Tables
    
    mysql_query("CREATE TABLE `request` (
          `Habbo Name` varchar(20) NOT NULL default '',
          `Song Request` varchar(50) NOT NULL default '',
          `Shoutout\Joke` varchar(10) NOT NULL default '',
          PRIMARY KEY  (`Habbo Name`)
        ) TYPE=MyISAM") or die(mysql_error());

    I know its really bad but i need help... :]

    Demo at http://smileyoureahabbo.freepgs.com/install.php
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
        if(empty($muser) || empty($mpass) || empty($mdata) ||{
    Forgot to close the condition.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    err??? How Do You Do That... lol i'm dumb.
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Indubitably.
    Code:
        if(empty($muser) || empty($mpass) || empty($mdata)){
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Its still not working...

    Code:
        <form method='post' action='install.php?step=1'>
        <table>
        <tr>
          <td>MySQL User:</td>
          <td><input type='text' name='muser' size='20'></td>
        </tr>
        <tr>
          <td>MySQL Password:</td>
          <td><input type='text' name='mpass' size='20'></td>
        </tr>
        <tr>
          <td>MySQL Database:</td>
          <td><input type='text' name='mdata' size='20'></td>
        </tr>
        <tr>
       
         <td>Make sure all the above info is correct.</td>
           
          <td><input type='submit' name='submit' value='Submit'></td>
        </tr>
        </table>
        </form>";
    
        
    
         }else{
        $muser = $_POST['muser']; $mpass = $_POST['mpass'];
        $mdata = $_POST['mdata']; 
        
        if(empty($muser) || empty($mpass) || empty($mdata)){
          Echo"<b>Error:</b> You have some boxes with No info in them, You MUST fill in EVERY BOX!";
          die();
        }
    
    // Connect to Check
        mysql_connect ("localhost", "$muser", "$mpass") or die(mysql_error());
        mysql_select_db ("$mdata");
    
        // Create Tables
    
    mysql_query("CREATE TABLE `request` (
          `Habbo Name` varchar(20) NOT NULL default '',
          `Song Request` varchar(50) NOT NULL default '',
          `Shoutout\Joke` varchar(10) NOT NULL default '',
          PRIMARY KEY  (`Habbo Name`)
        ) TYPE=MyISAM") or die(mysql_error());
    demo: http://smileyoureahabbo.freepgs.com/install.php
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  6. #6
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hmm....
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Can you give us the error(s) you get?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It shows the accual text thats in the file on the page:

    Code:
    "; }else{ $muser = $_POST['muser']; $mpass = $_POST['mpass']; $mdata = $_POST['mdata']; if(empty($muser) || empty($mpass) || empty($mdata)){ Echo"Error: You have some boxes with No info in them, You MUST fill in EVERY BOX!"; die(); } // Connect to Check mysql_connect ("localhost", "$muser", "$mpass") or die(mysql_error()); mysql_select_db ("$mdata"); // Create Tables mysql_query("CREATE TABLE `request` ( `Habbo Name` varchar(20) NOT NULL default '', `Song Request` varchar(50) NOT NULL default '', `Shoutout\Joke` varchar(10) NOT NULL default '', PRIMARY KEY (`Habbo Name`) ) TYPE=MyISAM") or die(mysql_error());

    You can see what I meen at http://smileyoureahabbo.freepgs.com/install.php
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  9. #9
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    -sighs-
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  10. #10
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey you have any idea?
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •