Update product image
Hi again. Using file upload not grabbing productImage . I set Default file with my recortset. Do I need to do something else? I meant, if I update the name for example it not keep the image. Only if I insert again
Hi again. Using file upload not grabbing productImage . I set Default file with my recortset. Do I need to do something else? I meant, if I update the name for example it not keep the image. Only if I insert again
That should work. It could be an issue with the order of the server behaviors on the page. You would want to make sure your recordset is above the upload server behavior. If you attached a copy of the page I could take a look.
This is the field
<input name="ProductImage" type="file" class="form-control" id="ProductImage" value="<?php echo($Recordset1->getColumnVal("Image")); ?>">
and the update server behavior
$UpdateQuery->bindColumn("Image", "s", "".((isset($_FILES["ProductImage"]))?$_FILES["ProductImage"]["name"]:"") ."", "WA_DEFAULT");
Default file
'DefaultFileName' => "".($Recordset1->getColumnVal("Image")) ."",
the form has the same setting like insert. example
<form method="post" enctype="multipart/form-data" name="form1" id="form1" role="form">
You can't set the value of a file field.
You can set the default value of the file upload field in the file upload server behavior... that is where you set it to the existing recordset value.
Your update query should be set to the Upload File value "Server File Name". It will contain the name of the uploaded file if one was uploaded and will use the default value (set to the recordset field) when no file is uploaded.
I also did like this but not worked
<input name="ProductImage" type="file" class="form-control" id="ProductImage">
let me try the whay you say.
I want you see because I don't find the error
Your Update server behavior bindings needs to be set to the upload file value "Server File Name". The rest seems correct.
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.