Menu

#48 Crowdsoucing DB logging PHP script

1.0
closed
None
2016-02-23
2015-06-16
No

Dear Patrick,

Would you please assist putting together functionality for logging crowdsourcing questionnaire responses into the logging DB?

  1. Please create a new DB table

  2. These are fields which should be featured in this table:

id, randCode, date [now()], elementName, elementValue

  1. Enable PHP scripts to be executed on a web server co-located with the DB

  2. Create a PHP script that logs all POST elements it receives into the DB. The following is an example script doing something very similar (it uses $_GET rather than $_POST, and it executes a single UPDATE rather than multiple INSERTs; but you should get the gist):

", "<password>"); $query = "use <db name="">"; if (!mysql_query($query, $dbh)) die("database does not exist.\n"); $query = "SET SQL_BIG_SELECTS=1;"; if (!mysql_query($query, $dbh)) die("cannot set sql_big_selects.\n"); print "x=".$_GET["x"]; $query = " UPDATE asTest SET plane = '".$_GET["plane"]."', col = '".$_GET["col"]."' where id = 1; "; $result = mysql_query($query); ?>

Thanks,

DSO

</db></password>

Discussion

  • Patrick L. Lange

    The script is created but not checked in yet.

     
  • Patrick L. Lange

    • assigned_to: Patrick Lange --> David Suendermann-Oeft
     
  • Patrick L. Lange

    Decide where to place the script template in sourceforge.

     
  • Vikram Ramanarayanan

    • status: open --> closed
     
  • Vikram Ramanarayanan

    Closing this ticket as this functionality was implemented by Patrick.

     

Log in to post a comment.