Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 21st, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Add data from one table to another when specific data form one table is selected
  2. <input type="hidden" value="<?php echo $bulletinsDateVal ?>" />
  3.        
  4. // Code which handles the POST from the form on add_media.php
  5. $bulletinDataSelectVal = $_POST['bulletinDataSelect'];
  6.  
  7. $sqlInsert = "INSERT INTO publications(filename, other, form, data)
  8.     VALUES( (SELECT filename FROM bulletins WHERE id = '$bulletinDataSelectVal'),
  9.         'blah',
  10.         'dee',
  11.         'blah')";
  12.        
  13. <select name="bulletinDataSelect">
  14.     <option value="<?php echo bulletinData["id"]; ?>"><?php echo $bulletinData["bulletin_date"]; ?>