The first page that collects the info for the main photos table (title, orientation, size etc) :
This goes to a validation page, which inserts the data into the table :PHP Code:<form action="validation.php" method="post" enctype="multipart/form-data" name="isc" id="form1">
<table width="66%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="labelcell">File Name * </td>
<td class="fieldcell"><input name="uploadFile" type="file" size="55">
<input type="hidden" name="MAX_FILE_SIZE" value="25000" /> </td>
</tr>
<tr>
<td width="8%" class="labelcell">Title * </td>
<td width="17%" class="labelcell">
<div align="left">
<input name="DefautButton" type="button"
onClick="Title.value=uploadFile.value?uploadFile.value:'No file'" value="File Name">
</div></td>
<td class="fieldcell">
<input name="Title" type="text" id="Title" size="69">
</td>
</tr>
<tr>
<td colspan="2" class="labelcell">Link ID</td>
<td width="75%" class="fieldcell"><input name="Link_ID" type="text" id="Link_ID" size="10"></td>
</tr>
<tr>
<td colspan="2" class="labelcell">Supplier * </td>
<td class="fieldcell">
<input name="Supplier" type="text" id="Supplier" size="69">
</td>
</tr>
<tr>
<td colspan="2" class="labelcell">Rights * </td>
<td class="fieldcell"><select name="Rights" id="Rights">
<option value=" ">Select Rights</option>
<option value="Unknown">Unknown</option>
<option value="Licenced - Pay Licence per product">Licenced - Pay Licence per product</option>
<option value="Royalty Free - One off fee + credit">Royalty Free - One off fee + credit</option>
<option value="Credited">Credited</option>
</select></td>
</tr>
<tr>
<td colspan="2" class="labelcell">Rights Details </td>
<td class="fieldcell"><textarea name="Rights_Details" cols="52" rows="3" id="Rights_Details"></textarea></td>
</tr>
<tr>
<td class="labelcell">Credit</td>
<td class="labelcell">
<div align="left">
<input name="DefautButton" type="button"
onClick="Credit.value=Supplier.value" value="Supplier">
</div></td>
<td class="fieldcell">
<input name="Credit" type="text" id="Credit" size="69">
</td>
</tr>
etc
<tr bgcolor="#FFFFFF">
<td colspan="2"> </td>
<td><input name="Submit" type="submit" value="NEXT : Add photo keywords">
<input type="reset" name="Reset" value="Reset form"></td>
</tr>
</table>
</form>
and then sends the user on to the Add Keywords page - which is still in it's original form with the hard coded checkboxes :PHP Code:if (mysql_errno() == 0) {
@mysql_select_db("photolibrary", $mysql_link);
}
if (mysql_errno() == 0) {
$sqlcmd = "INSERT INTO photos(Photo_File, Title, Link_ID, Supplier, Rights, Rights_Details, Credit, Orientation, Year, Country, Admin, Region, Easting, Northing, Tif, Width, Height) VALUES('$FTG_uploadFile', '$FTG_Title', '$FTG_Link_ID', '$FTG_Supplier', '$FTG_Rights', '$FTG_Rights_Details', '$FTG_Credit', '$FTG_Orientation', '$FTG_Year', '$FTG_Country', '$FTG_Admin', '$FTG_Region', '$FTG_Easting', '$FTG_Northing', '$FTGTif', '$FTGWidth', '$FTGHeight')";
@mysql_query($sqlcmd, $mysql_link);
$Photo_ID = mysql_insert_id ();
}
So again, just looking to do the same thing here as with the edit keywords code above - ie output them all using arrays.PHP Code:<form name="form1" id="form1" method="POST" action="photoProfilesAdded.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="10" valign="middle" class="labelcell"><span class="labelcell2">Places of Interest / Buildings </span></td>
</tr>
<tr bgcolor="#FFFFFF">
<input type='hidden' name='Photo_ID' value='<!--FIELDVALUE:Photo_ID-->'>
<td class="keywordcell" width="2%" valign="middle"><input name="ckbox[2]" type="checkbox" class="tickbox2" id="ckbox[2]"></td>
<td class="keywordcell2" width="18%">Ancient Monument </td>
<td class="keywordcell" width="2%" valign="middle"><input name="ckbox[3]" type="checkbox" class="tickbox2" id="ckbox[3]"></td>
<td class="keywordcell2" width="18%">Aquarium</td>
etc




Bookmarks