<?php
  require ("includes/DBConnection.php");  
?>  

<?php
    $id =$_REQUEST['a_id'];

    // sending query

    //mysql_query("INSERT INTO audittrail(article.a_title,article.a_author,article.a_description,article.a_date, article.dept_id)
                    //WHERE article.a_id='$id'")

    mysql_query("INSERT INTO audittrail SELECT * FROM article WHERE a_id='$id'")

    or die(mysql_error());      
    mysql_query("DELETE FROM article WHERE a_id = '$id'")
    header("Location: articlelist-a.php");
?>

Parse error: syntax error, unexpected T_STRING in C:\wamp_chieny\www\MULTI\ADMIN_MULTI\article-del.php on line 17

i try to comment this part: mysql_query("DELETE FROM article WHERE a_id = '$id'") and unfortunately it works but i need this syntax to delete certain data row in my table. where should i put the delete syntax?

At the end of line 16, you need to add ";" at the end of that line, so that it looks like this:

mysql_query("DELETE FROM article WHERE a_id = '$id'");
commented: ty :) really appreciate +0

Also, you will need to add ";" at the end of other lines that are giving you issue.

thank you for the reply :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.