/modules/images/ajax/add_screenshot_tag.php

https://bitbucket.org/websightdesigns/project-manager · PHP · 24 lines · 23 code · 0 blank · 1 comment · 0 complexity · 01c016f407e78cb812861aaecd49b335 MD5 · raw file

  1. <?php
  2. include('../../../config.php');
  3. include('../../../mysql.php');
  4. $link = mysql_connect($mysqlhost, $mysqluser, $mysqlpass) or die("Could not connect to server");
  5. mysql_select_db($mysqldb) or die("Could not select database");
  6. $insert_sql = "INSERT INTO screenshots_pos (
  7. `screenshot_id`,
  8. `x_coord`,
  9. `y_coord`,
  10. `width`,
  11. `height`,
  12. `tag_text`
  13. ) VALUES (
  14. '" . $_POST['id'] . "',
  15. '" . $_POST['pos_x'] . "',
  16. '" . $_POST['pos_y'] . "',
  17. '" . $_POST['pos_width'] . "',
  18. '" . $_POST['pos_height'] . "',
  19. '" . $_POST['tag_text'] . "'
  20. )";
  21. $insert_query = mysql_query($insert_sql) or die(mysql_error());
  22. echo $update_sql;
  23. //echo $_POST['id'];
  24. ?>