Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2013
    Posts
    24
    Thanks
    8
    Thanked 0 Times in 0 Posts

    isset syntax error

    Hi guys im having a problem diagnosing a syntax error

    Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in /home/clairvis/public_html/test2/delete.php on line 2

    I have been playing around all evening and stuck on this little script that's the final part of the task at hand, any assistance would be greatly appreciated kind regards Chris

    Code:
    <?php
    if(isset($_POST['delete_id'] && !empty($_POST['delete_id'])) {
      $delete_id = mysql_real_escape_string($_POST['delete_id']);
      mysql_query("DELETE FROM oc_t_forum_question WHERE `id`=".$delete_id);
      header('Location: main.php');
    }
    ?>

  • #2
    New to the CF scene
    Join Date
    May 2013
    Posts
    8
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Try this...

    PHP Code:
    if(isset($_POST['delete_id']) && !empty($_POST['delete_id'])) 

  • Users who have thanked valandor062 for this post:

    promotec (05-26-2013)

  • #3
    New Coder
    Join Date
    May 2013
    Posts
    24
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Many thanks that sorted it out fine
    Regards Chris

  • #4
    New to the CF scene
    Join Date
    May 2013
    Posts
    8
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Not a problem man, I'm glad it worked for you. I was having to type it out on my phone so glad the syntax was correct...


  •  

    Posting Permissions

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