Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34

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

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

    Default

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

  2. #22
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jad9321
    And what should the condition be, cause i'm stupid...
    cheer up kiddo.... just a newbie thing.... dont look down on urself...

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

    Default

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

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

    Default

    if that is the case, that if part should be before the else part
    huh??
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  5. #25
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok...ok.... sorry thought u might catch what m trying to say .... give u what i think should be the outlook of the php script....
    PHP Code:
    <? 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();
        } 
    ?>
    <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']; 
        }
    // 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()); ?>
    this is a 100% perfect script....

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

    Default

    Now i'm getting this error:

    Parse error: parse error, unexpected '{' in /fpgs/fpgshttpd/smileyoureahabbo/install.php on line 1
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  7. #27
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Indubitably.
    Code:
        if(empty($muser) || empty($mpass) || empty($mdata)){
    use the code above on line 1
    might help

  8. #28
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    if there still exist errors, its now way out of my league

    sorry

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

    Default

    So it should look like this?


    Code:
    <? 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();
        } ?>
    <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']; 
        }
    // 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()); ?>
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  10. #30
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah more or less something like that

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
  •