01-12-2010, 08:43 PM
I'm trying to add what sounds like a very simple feature, but am having some issues with PHP. I can read and somewhat understand the PHP, but am more comfortable with VB and Java. What I'm trying to add looks like it should be no more than 2 lines of code, but I cannot get those to work.
I am trying to get it to record in history when someone authorizes a document. I took the code that is added when someone adds a document from add.php. Here is the code that looks like it is making the history comment:// Add a log entry
$query = "INSERT INTO log (id,modified_on, modified_by, note, revision) VALUES ( '$fileId', NOW(), '" . addslashes($username) . "', 'Initial import', 'current')";
$result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error());
When I add this to toBePublished.php I get errors. If any one could help me out I would appreciate it.
Thank you.
dvst8s
I am trying to get it to record in history when someone authorizes a document. I took the code that is added when someone adds a document from add.php. Here is the code that looks like it is making the history comment:// Add a log entry
$query = "INSERT INTO log (id,modified_on, modified_by, note, revision) VALUES ( '$fileId', NOW(), '" . addslashes($username) . "', 'Initial import', 'current')";
$result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error());
When I add this to toBePublished.php I get errors. If any one could help me out I would appreciate it.
Thank you.
dvst8s