0
<?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?

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by chieny
1

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'");
Votes + Comments
ty :) really appreciate
0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.