SitePoint Sponsor

User Tag List

Results 1 to 25 of 25

Hybrid View

  1. #1
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Database Query Through PHP...

    I have this script:

    PHP Code:
    <?php
    include('../includes/db.php');
    echo(
    '<p>This page will attempt to create the MySQL Tables for you.<br />');
    $userstable 'CREATE TABLE users (
        id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
        username TEXT,
        password TEXT,
        registerdate DATE NOT NULL,
        admin TEXT,
        author TEXT
        )'
    ;
    if (@
    mysql_query($usertable)) {
        echo 
    'User table successfully created!<br />';
    } else {
        exit(
    'Error creating the User table: ' .
            
    mysql_error() . '<br />Please use your database management application to add this to your database:<br />
            <textarea>CREATE TABLE users (
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
            username TEXT,
            password TEXT,
            registerdate DATE NOT NULL,
            admin TEXT,
            author TEXT
            )</textarea><br />'
    );
    }
    $newstable 'CREATE TABLE news (
        id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
        author TEXT,
        date DATE NOT NULL,
        newstext TEXT,
        category TEXT,
        )'
    ;
    if (@
    mysql_query($newstable)) {
        echo 
    'News table successfully created!<br />';
    } else {
        exit(
    'Error creating the News table: ' .
            
    mysql_error() . '<br />Please use your database management application to add this to your database:<br />
            <textarea>CREATE TABLE news (
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
            author TEXT,
            date DATE NOT NULL,
            newstext TEXT,
            category TEXT</textarea><br />'
    );
    }
    if (@
    mysql_query($usertable$newstable)) {
        
    header("Location: install2.php");

    ?>
    As you can tell that is supposed to create 2 tables, users and news.

    when I run it, I get:

    This page will attempt to create the MySQL Tables for you.
    Error creating the User table: Query was empty
    Please use your database management application to add this to your database:

    How can the query be empty? when it clearly has stuf in it...

    Does anyone see what I did wrong?

    Thanks,
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  2. #2
    SitePoint Enthusiast Imprint's Avatar
    Join Date
    May 2005
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    PHP Code:
    <?php 
    include('../includes/db.php'); 
    echo(
    '<p>This page will attempt to create the MySQL Tables for you.<br />'); 
    $usertable 'CREATE TABLE users ( 
        id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
        username TEXT, 
        password TEXT, 
        registerdate DATE NOT NULL, 
        admin TEXT, 
        author TEXT 
        )'

    if (@
    mysql_query($usertable)) { 
        echo 
    'User table successfully created!<br />'
    } else { 
        exit(
    'Error creating the User table: ' 
            
    mysql_error() . '<br />Please use your database management application to add this to your database:<br /> 
            <textarea>CREATE TABLE users ( 
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
            username TEXT, 
            password TEXT, 
            registerdate DATE NOT NULL, 
            admin TEXT, 
            author TEXT 
            )</textarea><br />'
    ); 

    $newstable 'CREATE TABLE news ( 
        id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
        author TEXT, 
        date DATE NOT NULL, 
        newstext TEXT, 
        category TEXT, 
        )'

    if (@
    mysql_query($newstable)) { 
        echo 
    'News table successfully created!<br />'
    } else { 
        exit(
    'Error creating the News table: ' 
            
    mysql_error() . '<br />Please use your database management application to add this to your database:<br /> 
            <textarea>CREATE TABLE news ( 
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
            author TEXT, 
            date DATE NOT NULL, 
            newstext TEXT, 
            category TEXT</textarea><br />'
    ); 

    if (@
    mysql_query($usertable$newstable)) { 
        
    header("Location: install2.php"); 

    ?>
    All I did was fix a typo in your script. You adressed the variable name in the query as $usertable, while you defined it as $userstable.
    "Two roads diverged in a wood, and I
    I took the road less travelled by,
    And that has made all the difference."
    Discover the master...

  3. #3
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe, that worked, and I also had to fix an erro in the sql syntax for the newstable, now, towards the bottom, I have:

    if (@mysql_query($usertable, $newstable)) {
    header("Location: install2.php");

    This isn't redirecting me to install2.php how would I make it check if both where successful, and if they were, redirect?

    Thanks,

    EDIT:

    install2.php is:

    PHP Code:
    <center>
    <?php
    include('../includes/db.php');
    $checkmysql mysql_query('SHOW TABLES;')
    if (!@
    $checkmysql) {
        
    header("Location: install1.php");
    } else {
        echo(
    '<p>It looks like your tables where created successfully, so lets create the admin account, so you can login:</p>');
    }
    ?>
    <form method='post' action='install3.php'>
    A <font color='#FF0000'>*</font> indicates a required field.<br />
    Username: <input name='username' type='text' value='' /><font color='#FF0000'>*</font><br />
    Password: <input name='password' type='password' value='' /><font color='#FF0000'>*</font><br />
    <input type='submit' value='Submit' />
    </form>
    </center>
    I get:
    Parse error: parse error, unexpected T_IF in /usr/local/apache/htdocs/jabirdcms/install/install2.php on line 5

    if (!@$checkmysql) {
    is line 5...

    I was using that to see if install1.php was run correctly, and if it wasn't, fail, and return to install1.php...
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  4. #4
    SitePoint Enthusiast Imprint's Avatar
    Join Date
    May 2005
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not being the biggest expert at PHP/MySQL, I gave it a shot anyways. I faced the same problem a couple of days ago and solved it by changing around the order of the if-else structure in the script.

    I did the same with your script. I added tabs so you could see what has changed and what it is supposed to do. Let's hope it works at once:

    PHP Code:
    <?php
    include('../includes/db.php');

    echo(
    '<p>This page will attempt to create the MySQL Tables for you.<br />');
    $usertable 'CREATE TABLE users (
        id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
        username TEXT,
        password TEXT,
        registerdate DATE NOT NULL,
        admin TEXT,
        author TEXT
        )'
    ;
    if (@
    mysql_query($usertable)) {
        echo 
    'User table successfully created!<br />';

        
    $newstable 'CREATE TABLE news (
        id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
        author TEXT,
        date DATE NOT NULL,
        newstext TEXT,
        category TEXT,
        )'
    ;

        if (@
    mysql_query($newstable)) {
        echo 
    'News table successfully created!<br />';
        
    header("Location: install2.php");
        }
        
        else {
        exit(
    'Error creating the News table: ' .
            
    mysql_error() . '<br />Please use your database management application to add this to your database:<br />
            <textarea>CREATE TABLE news (
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
            author TEXT,
            date DATE NOT NULL,
            newstext TEXT,
            category TEXT</textarea><br />'
    );
        }
    }

    else {
        exit(
    'Error creating the User table: ' .
            
    mysql_error() . '<br />Please use your database management application to add this to your database:<br />
            <textarea>CREATE TABLE users (
            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
            username TEXT,
            password TEXT,
            registerdate DATE NOT NULL,
            admin TEXT,
            author TEXT
            )</textarea><br />'
    );
    }
    ?>
    "Two roads diverged in a wood, and I
    I took the road less travelled by,
    And that has made all the difference."
    Discover the master...

  5. #5
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, on install1.php, I get:

    This page will attempt to create the MySQL Tables for you.
    User table successfully created!
    News table successfully created!

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache/htdocs/jabirdcms/install/install1.php:4) in /usr/local/apache/htdocs/jabirdcms/install/install1.php on line 26
    and on install2.php I get:

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache/htdocs/jabirdcms/install/install2.php:2) in /usr/local/apache/htdocs/jabirdcms/install/install2.php on line 6
    A * indicates a required field.
    Username: *
    Password: *
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  6. #6
    SitePoint Enthusiast Imprint's Avatar
    Join Date
    May 2005
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... I remember reading somewhere that header information needs to be sent at the top of the page. This is well out of my league, I never used headers, but I will see what I can find.

    - Edit -

    I just found something which will probably work. You should add this just beneath the PHP opening tags.

    ob_start();

    As far as I could gather it triggers the output buffering setting (which is the thing preventing you from sending headers). By doing this, it should be switched to 'off' which should allow you to send the header, after having sent out the content with your echo statements.
    "Two roads diverged in a wood, and I
    I took the road less travelled by,
    And that has made all the difference."
    Discover the master...

  7. #7
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, that fixed that problem...

    now, in install3.php I have:

    PHP Code:
    <?php
    ob_start
    ();
    include(
    '../includes/db.php');
    $username = ($_POST['username']);
    $password = (md5($_POST['password']));

    $sql "INSERT INTO author SET
        username='
    $username',
        password='
    $password',
        admin='1'
        registerdate='curdate()'"
    if ($sql) {
        
    header("Location: install4.php");
    } else {
        exit(
    '<p>We where unable to create your admin account.</p>');
    ?>
    the error I get is:

    Parse error: parse error, unexpected T_IF in /usr/local/apache/htdocs/jabirdcms/install/install3.php on line 12
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  8. #8
    SitePoint Enthusiast Imprint's Avatar
    Join Date
    May 2005
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is you forgot to close the $sql variable. Add a ; at the end of the declaration of that variable and it should work.
    "Two roads diverged in a wood, and I
    I took the road less travelled by,
    And that has made all the difference."
    Discover the master...

  9. #9
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, now I have:

    Parse error: parse error, unexpected $ in /usr/local/apache/htdocs/jabirdcms/install/install3.php on line 16

    The entire code is:

    PHP Code:
    <?php
    ob_start
    ();
    include(
    '../includes/db.php');
    $username = ($_POST['username']);
    $password = (md5($_POST['password']));

    $sql "INSERT INTO author SET
        username='
    $username',
        password='
    $password',
        admin='1'
        registerdate='curdate()'"
    ;
    if (
    $sql) {
        
    header("Location: install4.php");
    } else {
        exit(
    '<p>We where unable to create your admin account.</p>');
    ?>
    See any problems there?

    Line 16 is:

    ?>
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  10. #10
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jabird
    PHP Code:
    $sql "INSERT INTO author SET
        username='
    $username',
        password='
    $password',
        admin='1'
        registerdate='curdate()'"

    missing comma after admin='1'
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  11. #11
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jabird
    Still getting an error
    sure, you have to close the curly brace at the end as well:

    PHP Code:
    if ($sql) {
        
    header("Location: install4.php");
    } else {
        exit(
    '<p>We where unable to create your admin account.</p>');
    // <-- That's missing 
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  12. #12
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still getting an error

    Thanks for pointing that out though
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  13. #13
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great! Thanks alot, it works now

    ~jabird
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  14. #14
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eh, spoke to soon, everything appears to be working, but it doesn't add a user to the MySQL database when I hit submit...

    edit... it'd probly help if I made an sql query to use that variable huh?

    =\

    edit2: well, now it gives me an unable to create your admin account error... so thats progress...
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  15. #15
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmpf
    you're starting with ob_start(), which means that you are buffering the content: ob_start()
    Now you have to flush it somewhen as well, since it remains buffered otherwise: ob_end_flush()

    And make sure you're passing value(s) for your variable(s).
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  16. #16
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright... heres my signup form:

    Code:
    <?php
    echo('<center><p>Now lets create the admin account, so you can login:</p>');
    ?>
    <form method='post' action='install3.php'>
    A <font color='#FF0000'>*</font> indicates a required field.<br />
    Username: <input name='username' type='text' value='' /><font color='#FF0000'>*</font><br />
    Password: <input name='password' type='password' value='' /><font color='#FF0000'>*</font><br />
    <input type='submit' value='Submit' />
    </form>
    </center>
    and here's install3.php:

    PHP Code:
    <?php
    ob_start
    ();
    include(
    '../includes/db.php');
    $username $_POST['username'];
    $password md5($_POST['password']);

    $sql "INSERT INTO author SET
        username='
    $username',
        password='
    $password',
        admin='1',
        registerdate='curdate()'"
    ;
    if (@
    mysql_query($sql)) {
        
    header("Location: install4.php");
    } else {
        exit(
    '<p>We where unable to create your admin account.</p>');
    }
    ob_end_flush()
    ?>
    I'm not so great at forms, incase you can't tell
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  17. #17
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, what do you get passed as username and password?

    PHP Code:
    if (@mysql_query($sql)) {} 
    why are you disabling the display of error(s)?
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  18. #18
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BTW, what are you doing with your sql? NOTHING
    so add a
    PHP Code:
    $result mysql_query($sql);
    if (
    $result// instead of if ($sql)
    {
       
    // ...

    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  19. #19
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    K... added that...

    so now I have:

    PHP Code:
    <?php
    ob_start
    ();
    include(
    '../includes/db.php');
    $username $_POST['username'];
    $password md5($_POST['password']);

    $sql "INSERT INTO author SET
        username='
    $username',
        password='
    $password',
        admin='1',
        registerdate='curdate()'"
    ;
    $result mysql_query($sql);
    if (
    $result) {
        
    header("Location: install4.php");
    } else {
        exit(
    '<p>We were unable to create your admin account.</p>');
    }
    ob_end_flush();
    ?>
    as install3.php... it still gives unable to create admin account.

    so first, am I even getting the data from the form correctly? or is the another way to do it?
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  20. #20
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't understand what you mean by the first question,

    and I disabled the non error display already:

    PHP Code:
    <?php
    ob_start
    ();
    include(
    '../includes/db.php');
    $username $_POST['username'];
    $password md5($_POST['password']);

    $sql "INSERT INTO author SET
        username='
    $username',
        password='
    $password',
        admin='1',
        registerdate='curdate()'"
    ;
    $result mysql_query($sql);
    if (
    $result) {
        
    header("Location: install4.php");
    } else {
        exit(
    '<p>We were unable to create your admin account.</p>');
    }
    ob_end_flush();
    ?>
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  21. #21
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to edit all the db connect stuff out, because I already have db.php and conf.php that does all the mysql connect and selecting...

    db.php:

    PHP Code:
    <?php
    include('conf.php');
    // Connect to the MySQL Server
    $dbcnx = @mysql_connect($ip$mysql_user$mysql_pass);
    if (!
    $dbcnx) {
        echo 
    '<p>Unable to connect to the ' .
            
    'database server at this time.</p>';
        exit();
    }
    // Select the MySQL Database
    mysql_select_db($db$dbcnx);
    if (!@
    mysql_select_db($db)) {
        exit(
    '<p>Unable to locate the ' .
            
    'database at this time.</p>');
    }
    ?>
    conf.php
    PHP Code:
    <?php
    // docs/configuration.html
    // Explains everything in this script.
    $title 'JabirdCMS';
    $path 'jabirdcms';
    $domain 'localhost';
    // MySQL Stuff:
    $ip 'localhost'// This will usually work...
    $mysql_user 'root'// The username used to connect to your MySQL Database
    $mysql_pass ''// The password used to connect to your MySQL Database
    $db '' // Your database name.
    ?>

  22. #22
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, let's simplify all this.

    Let's take just this chunk of code and try whther it works or not.
    Pretty q'n'd but it's working!
    You have to change curdate() to NOW(), btw.

    PHP Code:
    <form method='post' action='<?php echo $_SERVER['PHP_SELF']; ?>'>
    A <font color='#FF0000'>*</font> indicates a required field.<br />
    Username: <input name='username' type='text' value='' /><font color='#FF0000'>*</font><br />
    Password: <input name='password' type='password' value='' /><font color='#FF0000'>*</font><br />
    <input type='submit' value='Submit' />
    </form>

    <?php 
    // database access data, enter yours !
    $dbhost "localhost";
    $dbname "root";
    $dbpass "";
    $database "";
     
    $link = @mysql_connect($dbhost$dbname$dbpass);
    if (! 
    $link) {
        die(
    "error connecting to Server.");
    }
     
    if (! 
    mysql_select_db($database$link)) {
        die(
    "error connecting to database: $database");
    }

    ob_start(); 
    $username $_POST['username'];
    $password md5($_POST['password']);
     
    echo 
    $username ."<br>";
    echo 
    $password ."<br>";
     
    $sql "INSERT INTO author SET 
        username='
    $username', 
        password='
    $password', 
        admin='1', 
        registerdate=NOW()"
    ;
     
        
    $result mysql_query($sql);
     
    if (
    $result)
    {
        echo 
    "Sucessfully inserted in database"
    } else { 
        exit(
    '<p>We where unable to create your admin account.</p>'); 

     
    ob_end_flush() 
    ?>
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  23. #23
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, that worked, and I checked the database, and it had the username and md5hashed password, and the register date!

    Is there any real purpose for:

    echo $username ."<br>";
    echo $password ."<br>";
    ? I just see it showing the password as a security threat, it may not be wise to show off the md5hash right on the website... so if your just showing that to make sure the md5 and all works, I'm just gonna take it out.. is that ok?

    Edit: I also want sometihng like:

    if (mysql_query($usertable, $newstable)) {
    echo("<a href='install2.php'>Next</a>");
    }

    but thats not working... is there a way to check if both query's worked, and if they did, show a next link?
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  24. #24
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jabird
    Is there any real purpose for:
    echo $username ."<br>";
    echo $password ."<br>";
    no, it's just for checking whether a value is passed and - of course - must not be included in your official page.

    Edit: I also want sometihng like:
    no
    but not sure what you'r etrying to achieve
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  25. #25
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In install1.php, I create some database tables, I want to check if the 2 variables I made BOTH worked, and if they did, show a next link, and if 1 of the database query's failed, don't show then next link, and if both failed, don't show the next link...

    So I need an if statement that checks for failure, if there was none, it shows a link to the next isntall page
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?


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
  •