Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 5 of 5
  1. #1
    Platinum Lifetime Member
    GlobalFusion's Avatar
    Join Date
    Jan 2005
    Location
    Australia
    Posts
    477
    DNF$
    867
    Bank
    0
    Total DNF$
    867
    Donate  

    Post PHP / MySQL Error

    The error:
    Code:
     Parse error:  parse error, unexpected T_VARIABLE

    The Code:
    PHP Code:
     $add_query "INSERT INTO articles VALUES ('','".$title."','now()','".$article."')";
     
    mysql_query($add_query); 

    Im overlooking something.. i know it.. but what?
    The *one thing* necessary for ParkingSite profits
    [»»» Today's Hot Domain Sale! «««]

  2. #2
    Platinum Lifetime Member
    mikesherov's Avatar
    Join Date
    Jan 2005
    Location
    NY
    Posts
    463
    DNF$
    2,143
    Bank
    0
    Total DNF$
    2,143
    Donate  

    Re: PHP / MySQL Error

    your error is on the previous line to this code, global.

  3. #3
    Platinum Lifetime Member
    GlobalFusion's Avatar
    Join Date
    Jan 2005
    Location
    Australia
    Posts
    477
    DNF$
    867
    Bank
    0
    Total DNF$
    867
    Donate  

    Re: PHP / MySQL Error

    Heres the full code mike:

    PHP Code:
    <?php
    if(isset($_GET['add']) && ($_GET['add']=='true')){

    $title $_POST['title'];
    $article $_POST['article']

    [
    b]$add_query "INSERT INTO articles VALUES ('','".$title."','now()','".$article."')";[/b]
    mysql_query($add_query);

    mysql_close();
    echo 
    'The Article: <b>'.$title.'</b> has been added to the database.';
    }
    ?>
    There error is apparently on Line #7 (made bold)
    The *one thing* necessary for ParkingSite profits
    [»»» Today's Hot Domain Sale! «««]

  4. #4
    DNF Member

    Join Date
    Nov 2002
    Location
    US :-)
    Posts
    450
    DNF$
    14,531
    Bank
    0
    Total DNF$
    14,531
    Donate  

    Re: PHP / MySQL Error

    $article = $_POST['article']

    Needs a semicolon at the end.

  5. #5
    Platinum Lifetime Member
    GlobalFusion's Avatar
    Join Date
    Jan 2005
    Location
    Australia
    Posts
    477
    DNF$
    867
    Bank
    0
    Total DNF$
    867
    Donate  

    Re: PHP / MySQL Error

    LMAO.

    I knew it was something simple I was overlooking.

    (here i am saying to myself.. T_VARIABLE = missing semi-colon - but im not missing one)

    lol

    cheers.
    The *one thing* necessary for ParkingSite profits
    [»»» Today's Hot Domain Sale! «««]

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
  •  

Domain name forum recommended by Domaining.com