delete image
Hey guys
Just wondering how I would get an _update.php page to allow for a file that had been added from the _insert.php page to be removed/deleted from the database?
Cheers
Jamie
Hey guys
Just wondering how I would get an _update.php page to allow for a file that had been added from the _insert.php page to be removed/deleted from the database?
Cheers
Jamie
add a new form to the page to be used for deleting the image.
in the form you nee a hidden element and a submit button.
set the value of the hidden element to use the file name column from the recordset that populates the update page.
add the delete file behavior, and use the hidden element for the file name, set the trigger to the delete file form button being pressed
sorry if this ia a bit obvious Jason but does the submit button remain visible and is that how the user would delete the image by clicking on that?
thanks. can the 2nd form be nested within the original form?
no, you cannot nest forms.
thanks Jason.
So am assuming that I can position the delete button by an element of the original form but i would need to use relative/absolute positioning to 'put' it there?
think I am getting a little muddled on the form and delete aspect itself.
Have set the form up with the hidden element and the delete button... just not sure what I should be putting as the action?
<form action="" method="post">
<input name="Image1" type="hidden" value="<?php echo $row_WADAwebsites['Image1']; ?>" />
<input name="Delete" type="button" value="Delete Image" /></form>
Image1 is the row to be deleted
In the delete record, I cannot see the delete button in the drop down for the trigger.
In the lookup, do I select key column to be Image1 or the primary key as set in the dbase?
Then in the value, am assuming that you click the dynamic button and select Image1 from the recordset?
the delete button input type needs to be set to submit instead of button.
for the lookup column, you select the image1
for the look up value, you click the lightning bolt icon and select the hidden form element.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.