Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: My Install File

  1. #1
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Question My Install File

    Well, this is my first ever try at making an install file, and it isn't going too well. I have the following code:

    PHP Code:
    <? 
    include "iconfig.php";

    // DO NOT edit the following unless you know what you are doing
    if ($_GET['step'] == '1') {
    $query mysql_query("CREATE TABLE `users` (
      `uid` int(11) NOT NULL AUTO_INCREMENT,
      `username` varchar(50) NOT NULL,
      `password` varchar(500) NOT NULL,
      PRIMARY KEY  (`uid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"
    );

    $query mysql_query("CREATE TABLE `petition` (
    `id` INT( 20 ) NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR( 30 ) NOT NULL ,
    `other` VARCHAR( 30 ) NOT NULL ,
    `comment` VARCHAR( 200 ) NOT NULL ,
    PRIMARY KEY ( `id` )
    ) ENGINE = MYISAM"
    );

    $query mysql_query("CREATE TABLE `admin` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` VARCHAR( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );

    $query mysql_query("CREATE TABLE `home` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );

    $query mysql_query("CREATE TABLE `other` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );

    $query mysql_query("CREATE TABLE `sign` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );

    $query mysql_query("CREATE TABLE `view` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );

    $query mysql_query("CREATE TABLE `titles` (
    `home` TEXT( 10000 ) NOT NULL ,
    `sign` TEXT( 10000 ) NOT NULL ,
    `view` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );

    $query mysql_query("INSERT INTO `admin` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (Home | <a href=\"edit.php\">View + Edit Comments / Other Details</a> | <a href=\"editpage.php\">Edit Pages</a> | <a href=\"editsite.php\">Edit Site Details</a>, Welcome to the administration panel, use the links above to navigate your way through the panel., This is optional PHP, you don't really need it for the admin CP main page., This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);");

    $query mysql_query("INSERT INTO `home` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (Home | <a href=\"sign.php\">Sign</a> <a href=\"view.php\">View Entries</a> | <a href=\"other.php\">Other</a>, Welcome! Edit all this text in the admin CP., This is optional PHP, you don't really need it for the main page., This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);");

    $query mysql_query("INSERT INTO `sign` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (<a href=\"index.php\">Home</a> | Sign <a href=\"view.php\">View Entries</a> | <a href=\"other.php\">Other</a>, Welcome! Edit all this text in the admin CP. This is NOT where you stick the form, etc., <?php
        // The database
        include 'config.php';
        
    // The variables
    $name = ($_POST[\"name\"]);
    $other = ($_POST[\"other\"]);
    $comment = ($_POST[\"comment\"]);
    $ip = $_SERVER[REMOTE_ADDR];

    //Those horrible IF's - Form data
    if (
    $_GET[\"action\"] == \"submit\")
    {
    if (
    $name == "")
        {
            echo \"Whoops! You didn't enter your name.\";
            exit;
        }
        
        
    if (
    $comment== "")
        {
            echo \"Whoops! You didnt enter a comment.\";
            exit;
        }
            
    $name = addslashes(htmlspecialchars($name));  
            
    $grade = addslashes(htmlspecialchars($grade));
            
    $comment = addslashes(htmlspecialchars($comment));
             
    $addpetition = mysql_query(\"INSERT INTO `petition` (`name`, `other`, `comment`, `ip`) VALUES ('$name','$other','$comment', '$ip')\"); 
            
        // The form details are fine, display text & details
        echo \"Thank you for signing the petition! Here are the details you submitted: <br />
    Name: 
    $name<br />
    Other: 
    $other<br />
    Your comment: 
    $comment<br />
    <br />
    To view all the signatures, click <a href=\"view.php\">here.</a> To go back to the home page, click <a href=\"index.php\">here.</a>\";
    exit;
    }

    else
    // Display the form
    {
        echo \"
    <div align\"center\">Want Miss Oppedisano to stay at O.L.H? Sign the petition below. Your support is needed.<br />
    <strong>Remember, only sign the petition once!</strong></div><br />
    <br />
    <form action=\"?action=submit\" method=\"post\">
        <div id=\"title\">Name:</div>
        <input type=\"text\" name=\"name\"><br /><br />
        <div id=\"title\">Other (EDIT IN ADMIN CP):</div>
        <input type=\"text\" name=\"other\"><br /><br />
        <div id=\"title\">Comment:</div>
        <style=\"width=\"169\"; height=\"116\"><textarea rows=\"7\" input type=\"text\" name=\"comment\" cols=\"28\"></textarea><br />
        <input type=\"submit\" name=\"submit\" value=\"Sign the petition!\">
        </form>\";
        exit;
        }
        
    ?>, This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);"
    );
    exit;
    }

    $query mysql_query("INSERT INTO `view` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (<a href=\"index.php\">Home</a> | <a href=\"sign.php\">Sign</a> View Entries | <a href=\"other.php\">Other</a>, Welcome! Edit all this text in the admin CP. This is NOT where you stick the form, etc., <?php
      //DB connection
      include \"config.php\";
      
      // Display number of entries
          
    $query = mysql_query(\"select count(*) from petition\");
        
    $result = mysql_result($query, 0);
        echo \"We have a total of <strong>
    $result</strong> signatures!\";
      ?>
      <?php
    // The database connetcion
    include \"config.php\";

    $sql = \"SELECT * FROM petition\";
    $check = mysql_query(\"SELECT name, other, comment FROM petition\") or die(\"Sorry, the data couldn't be displayed. Please check back later.\");
    // The above variables will be used to check our connection to MySQL.

    while (
    $display = mysql_fetch_array($check)) {

        
    $name = $display['name'];
        
    $other = $display['other'];
        
    $comment = $display['comment'];

        // Above are variables defined for our Name, Gradeand Comment.

        echo \"
    <strong>Name:</strong> 
    $name 
    <br> 
    <strong>Other:</strong> 
    $other
    <br>
    <strong>Comment:</strong><br>
    $comment
    <br>
    ____________________________________________________________<br /><br />
    \";

    }
    ?>, This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);"
    );

    $query mysql_query("INSERT INTO `other` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (<a href=\"index.php\">Home</a> | <a href=\"sign.php\">Sign</a> <a href=\"view.php\">View Entries</a> | Other, Welcome! Edit all this text in the admin CP. This is NOT where you stick the form, etc., This is optional PHP, you don't really need it for the other page. But it is other, so add whatever you want here., This is where you put any other stuff, you can edit all of this in the admin CP., Footer BBZ. Add your copyright etc. here.);");

    echo (
    "Step 1 done! Now, please enter your desired username and password for admin CP.<br />

    <form action=\"?step=2\" method=\"post\">
    Username:<br />
    <input type=\"text\" name=\"name\"><br />
    Password:<br />
    <input type=\"text\" name=\"password\"><br />
    <input type=\"submit\" name=\"start\" value=\"Step 2\"></form>"
    );
    };

    $user = ($_POST["username"]);
    $pass = ($_POST["password"]);
    $pass md5($password);

    elseif (
    $_GET['step'] == '2') {
    $query mysql_query("INSERT INTO `users` ( `uid` , `username` , `password` ) VALUES ( NULL, ‘$user’, ‘$pass‘ )");
    };

    else (
    "Welcome to the erPETITION v0.1 installer! This will add all the necessary databases and codes into your mySQL DB. Before you continue, <strong>please</strong> make sure your database info is correct.
    Host: 
    $db[host] <br>Username: $db[user] <br>Password: $db[pass] <br> Database: $db[name]<br />
    If your database info is incorrect, please go and edit config.php now.<br />
    <form action=\"?step=1\" method=\"post\"><input type=\"submit\" name=\"start\" value=\"Step 1\"></form>"
    );

    ?>
    I get the following error when viewing it:
    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deano/public_html/admin/install.php on line 85
    Line 85 is:
    PHP Code:
    $name = ($_POST[\"name\"]); 
    I'm pretty sure somebody knows the problem, as I've experimented and cannot figure out how to fix it. And, if you're nice enough/have the time, do you mind cleaning up the code a little?

    Thanks. +rep to any help.

    P.S.: The post editor doesnt let me add the beginning slash to
    PHP Code:
    $name = ($_POST[\"name\"]) 
    There is suppose to be a "\" before "name\", but it doesn't show up.

    Moved by Agesilaus (Forum Moderator) from Design and Development: Please post in the correct forum in future.
    Last edited by Agesilaus; 14-12-2007 at 11:43 PM.


    Selling DJ/Habbo layout, more info here.


  2. #2
    Join Date
    May 2007
    Location
    Los Angeles
    Posts
    1,212
    Tokens
    115

    Latest Awards:

    Default

    Quote Originally Posted by adamFTW View Post
    Well, this is my first ever try at making an install file, and it isn't going too well. I have the following code:

    PHP Code:
    <? 
    include "iconfig.php";
     
    // DO NOT edit the following unless you know what you are doing
    if ($_GET['step'] == '1') {
    $query mysql_query("CREATE TABLE `users` (
      `uid` int(11) NOT NULL AUTO_INCREMENT,
      `username` varchar(50) NOT NULL,
      `password` varchar(500) NOT NULL,
      PRIMARY KEY  (`uid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;"
    );
     
    $query mysql_query("CREATE TABLE `petition` (
    `id` INT( 20 ) NOT NULL AUTO_INCREMENT ,
    `name` VARCHAR( 30 ) NOT NULL ,
    `other` VARCHAR( 30 ) NOT NULL ,
    `comment` VARCHAR( 200 ) NOT NULL ,
    PRIMARY KEY ( `id` )
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("CREATE TABLE `admin` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` VARCHAR( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("CREATE TABLE `home` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("CREATE TABLE `other` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("CREATE TABLE `sign` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("CREATE TABLE `view` (
    `navigation` TEXT( 10000 ) NOT NULL ,
    `maincontent` TEXT( 10000 ) NOT NULL ,
    `php` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL ,
    `footer` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("CREATE TABLE `titles` (
    `home` TEXT( 10000 ) NOT NULL ,
    `sign` TEXT( 10000 ) NOT NULL ,
    `view` TEXT( 10000 ) NOT NULL ,
    `other` TEXT( 10000 ) NOT NULL
    ) ENGINE = MYISAM"
    );
     
    $query mysql_query("INSERT INTO `admin` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (Home | <a href=\"edit.php\">View + Edit Comments / Other Details</a> | <a href=\"editpage.php\">Edit Pages</a> | <a href=\"editsite.php\">Edit Site Details</a>, Welcome to the administration panel, use the links above to navigate your way through the panel., This is optional PHP, you don't really need it for the admin CP main page., This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);");
     
    $query mysql_query("INSERT INTO `home` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (Home | <a href=\"sign.php\">Sign</a> <a href=\"view.php\">View Entries</a> | <a href=\"other.php\">Other</a>, Welcome! Edit all this text in the admin CP., This is optional PHP, you don't really need it for the main page., This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);");
     
    $query mysql_query("INSERT INTO `sign` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (<a href=\"index.php\">Home</a> | Sign <a href=\"view.php\">View Entries</a> | <a href=\"other.php\">Other</a>, Welcome! Edit all this text in the admin CP. This is NOT where you stick the form, etc., <?php
        // The database
        include 'config.php';
     
    // The variables
    $name = ($_POST[\"name\"]);
    $other = ($_POST[\"other\"]);
    $comment = ($_POST[\"comment\"]);
    $ip = $_SERVER[REMOTE_ADDR];
     
    //Those horrible IF's - Form data
    if (
    $_GET[\"action\"] == \"submit\")
    {
    if (
    $name == "")
        {
            echo \"Whoops! You didn't enter your name.\";
            exit;
        }
     
     
    if (
    $comment== "")
        {
            echo \"Whoops! You didnt enter a comment.\";
            exit;
        }
            
    $name = addslashes(htmlspecialchars($name));  
            
    $grade = addslashes(htmlspecialchars($grade));
            
    $comment = addslashes(htmlspecialchars($comment));
             
    $addpetition = mysql_query(\"INSERT INTO `petition` (`name`, `other`, `comment`, `ip`) VALUES ('$name','$other','$comment', '$ip')\"); 
     
        // The form details are fine, display text & details
        echo \"Thank you for signing the petition! Here are the details you submitted: <br />
    Name: 
    $name<br />
    Other: 
    $other<br />
    Your comment: 
    $comment<br />
    <br />
    To view all the signatures, click <a href=\"view.php\">here.</a> To go back to the home page, click <a href=\"index.php\">here.</a>\";
    exit;
    }
     
    else
    // Display the form
    {
        echo \"
    <div align\"center\">Want Miss Oppedisano to stay at O.L.H? Sign the petition below. Your support is needed.<br />
    <strong>Remember, only sign the petition once!</strong></div><br />
    <br />
    <form action=\"?action=submit\" method=\"post\">
        <div id=\"title\">Name:</div>
        <input type=\"text\" name=\"name\"><br /><br />
        <div id=\"title\">Other (EDIT IN ADMIN CP):</div>
        <input type=\"text\" name=\"other\"><br /><br />
        <div id=\"title\">Comment:</div>
        <style=\"width=\"169\"; height=\"116\"><textarea rows=\"7\" input type=\"text\" name=\"comment\" cols=\"28\"></textarea><br />
        <input type=\"submit\" name=\"submit\" value=\"Sign the petition!\">
        </form>\";
        exit;
        }
     
    ?>, This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);"
    );
    exit;
    }
     
    $query mysql_query("INSERT INTO `view` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (<a href=\"index.php\">Home</a> | <a href=\"sign.php\">Sign</a> View Entries | <a href=\"other.php\">Other</a>, Welcome! Edit all this text in the admin CP. This is NOT where you stick the form, etc., <?php
      //DB connection
      include \"config.php\";
     
      // Display number of entries
          
    $query = mysql_query(\"select count(*) from petition\");
        
    $result = mysql_result($query, 0);
        echo \"We have a total of <strong>
    $result</strong> signatures!\";
      ?>
      <?php
    // The database connetcion
    include \"config.php\";
     
    $sql = \"SELECT * FROM petition\";
    $check = mysql_query(\"SELECT name, other, comment FROM petition\") or die(\"Sorry, the data couldn't be displayed. Please check back later.\");
    // The above variables will be used to check our connection to MySQL.
     
    while (
    $display = mysql_fetch_array($check)) {
     
        
    $name = $display['name'];
        
    $other = $display['other'];
        
    $comment = $display['comment'];
     
        // Above are variables defined for our Name, Gradeand Comment.
     
        echo \"
    <strong>Name:</strong> 
    $name 
    <br> 
    <strong>Other:</strong> 
    $other
    <br>
    <strong>Comment:</strong><br>
    $comment
    <br>
    ____________________________________________________________<br /><br />
    \";
     
    }
    ?>, This is where you put any other stuff, you can edit all of this using the Edit Site Pages link., Footer BBZ. Add your copyright etc. here.);"
    );
     
    $query mysql_query("INSERT INTO `other` (`navigation`, `maincontent`, `php`, `other`, `footer`) VALUES (<a href=\"index.php\">Home</a> | <a href=\"sign.php\">Sign</a> <a href=\"view.php\">View Entries</a> | Other, Welcome! Edit all this text in the admin CP. This is NOT where you stick the form, etc., This is optional PHP, you don't really need it for the other page. But it is other, so add whatever you want here., This is where you put any other stuff, you can edit all of this in the admin CP., Footer BBZ. Add your copyright etc. here.);");
     
    echo (
    "Step 1 done! Now, please enter your desired username and password for admin CP.<br />
     
    <form action=\"?step=2\" method=\"post\">
    Username:<br />
    <input type=\"text\" name=\"name\"><br />
    Password:<br />
    <input type=\"text\" name=\"password\"><br />
    <input type=\"submit\" name=\"start\" value=\"Step 2\"></form>"
    );
    };
     
    $user = ($_POST["username"]);
    $pass = ($_POST["password"]);
    $pass md5($password);
     
    elseif (
    $_GET['step'] == '2') {
    $query mysql_query("INSERT INTO `users` ( `uid` , `username` , `password` ) VALUES ( NULL, ‘$user’, ‘$pass‘ )");
    };
     
    else (
    "Welcome to the erPETITION v0.1 installer! This will add all the necessary databases and codes into your mySQL DB. Before you continue, <strong>please</strong> make sure your database info is correct.
    Host: 
    $db[host] <br>Username: $db[user] <br>Password: $db[pass] <br> Database: $db[name]<br />
    If your database info is incorrect, please go and edit config.php now.<br />
    <form action=\"?step=1\" method=\"post\"><input type=\"submit\" name=\"start\" value=\"Step 1\"></form>"
    );
     
    ?>
    I get the following error when viewing it:
    Line 85 is:
    PHP Code:
    $name = ($_POST[\"name\"]); 
    I'm pretty sure somebody knows the problem, as I've experimented and cannot figure out how to fix it. And, if you're nice enough/have the time, do you mind cleaning up the code a little?

    Thanks. +rep to any help.
    PHP Code:
    <? 
    include "iconfig.php";
    </SPAN></SPAN>

    changed to...

    PHP Code:
    <? 
    include "config.php";
    </SPAN></SPAN>

    possibly?
    deranged.

  3. #3
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Nope, it's suppose to be iconfig.php. Thanks though. +rep.

    Anybody else know what's up?


    Selling DJ/Habbo layout, more info here.


  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    I'll fix it in a sec.

  5. #5
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    I'll fix it in a sec.
    Thank you. ^_^


    Selling DJ/Habbo layout, more info here.


  6. #6
    Join Date
    Sep 2006
    Posts
    2,114
    Tokens
    0

    Latest Awards:

    Default

    If you dont mind me asking why do you have one include "iconfig.php"; and two include "config.php";

    ?
    Looking for a good desiner to design a social networking template.

    PM me.

  7. #7
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Quote Originally Posted by Ini View Post
    If you dont mind me asking why do you have one include "iconfig.php"; and two include "config.php";

    ?
    Those are being inserted into a mySQL database, and that will be displayed as PHP code on a webpage. It's suppose to be there. Thanks for trying, +rep.
    Last edited by adamFTW; 14-12-2007 at 11:52 PM.


    Selling DJ/Habbo layout, more info here.


  8. #8
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    ohh poop, shoudl there be the\'s in front of every "? i thought it was only ion echos when you use html

    maybe name should be ['name']

    (sorry if im wrong im peed.)

  9. #9
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Quote Originally Posted by Hitman View Post
    ohh poop, shoudl there be the\'s in front of every "? i thought it was only ion echos when you use html

    maybe name should be ['name']

    (sorry if im wrong im peed.)
    I do use "\"s, at least I believe I have done it for everything. If I haven't, could you please show me where?


    Selling DJ/Habbo layout, more info here.


  10. #10
    Join Date
    Jun 2006
    Posts
    4,832
    Tokens
    0

    Latest Awards:

    Default

    Hi Adam,

    You have things like

    $query = mysql_query(\"select count(*) from petition\");
    $result = mysql_result($query, 0);
    there shouldn't be any \ before " when it's pure PHP. If it's an HTML echo (ie echo "<input type=\"text\"> then there should, but on a query (ie query = mysql_query(\"INSTER INTO......\") there shouldn't be \.

    I'm not sure if it effects the script, but it isn't needed.

    Might be the cause, I really don't know but I do know it doesn't need to be there.

    Good luck mate!


Page 1 of 2 12 LastLast

Posting Permissions

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