
Untitled
By: a guest on
May 21st, 2012 | syntax:
None | size: 0.60 KB | hits: 14 | expires: Never
Add data from one table to another when specific data form one table is selected
<input type="hidden" value="<?php echo $bulletinsDateVal ?>" />
// Code which handles the POST from the form on add_media.php
$bulletinDataSelectVal = $_POST['bulletinDataSelect'];
$sqlInsert = "INSERT INTO publications(filename, other, form, data)
VALUES( (SELECT filename FROM bulletins WHERE id = '$bulletinDataSelectVal'),
'blah',
'dee',
'blah')";
<select name="bulletinDataSelect">
<option value="<?php echo bulletinData["id"]; ?>"><?php echo $bulletinData["bulletin_date"]; ?>