i am using phpUploadResize InsertRecord and i need to click submit twice to submit form i am using xampp the full code is from my upload_db.php
<?php session_start(); ?> <?php //********************** // DwZone Upload Resize //********************** require_once("dwzUpload/dwzUpload.php"); require_once('Connections/localhost.php'); ?> <?php //************************** // INSERT RECORD UPLOAD // http://www.DwZone-it.com // Version: 1.3.7 //************************** set_time_limit(5400); $upload = new dwzUpload(); $upload->SetProgressBar(""); $upload->SetTempFolder(""); $upload->SetTotalFileSize(""); $upload->SetRedirectUrl("update_ok.php"); $upload->SetFiles("/images;1;;;;1;img;1;;;;0;;;;;1;;1;img1@_@_@0@_@_@php@_@_@-1;640;480;80;-1;352;288;80;-1;_small;-1;1;0;;;80;0;_small;0@_@_@./@_@_@POST"); $upload->SetFormName("up_to_db_frm"); $upload->SetUploadType("insert"); $upload->SetValueToRedirectSend(""); $upload->SetDbParam($hostname_localhost, $database_localhost, $username_localhost, $password_localhost); $upload->SetEditTable("user"); $upload->SetFields("id|value|name|value|email|value|prv|value"); $upload->SetColumns("id|int|name|text|email|text|prv|text"); $upload->Execute(); ?> <!doctype html> <html> <head> <?php //********************** // DwZone Upload Resize //********************** require_once("dwzUpload/dwzUploadClient.php"); ?> <meta charset="utf-8"> <title>upload file to mysql</title> </head>
<body> <form ACTION="<?php echo $upload->GetEditAction(); ?>" enctype="multipart/form-data" method="post" onsubmit="return ProgressBar()" name="up_to_db_frm" id="up_to_db_frm"> <?php //***************************** // DwZone Upload Resize // This code must be the first // code after the FORM open tag //***************************** $upload->GetProgressBarField(); ?> <label for="id">id:</label> <input type="text" name="id" id="id"><br>
<label for="id">name:</label> <input type="text" name="name" id="name"><br>
<label for="id">email:</label> <input type="text" name="email" id="email"><br>
<label for="id">prv:</label> <input name="prv" type="text" id="prv" value="prv"><br>
<label for="id">img:</label> <input name="img1" type="file" id="img1" onChange="dwz_setEvent(this,'change')" onClick="dwz_setEvent(this,'click')"> <br> <input name="up_btn" type="submit" id="up_btn" value="upload"> <input type="hidden" name="dwzUpload" id="dwzUpload" value="up_to_db_frm" /> </form>
</body> </html> <?php //********************************* //* ADD WATERMARK //* http://www.DwZone.it //********************************* function dwzUploadGetWatermarkValue($img){ switch($img){ case "Big": return "mark/logo.png"; case "Thumb1": return ""; case "Thumb2": return ""; } } function dwzUploadGetWatermarkPosition(){ return "Top_left"; } //********************************* //* ADD WATERMARK //********************************* ?>
the output code is here
http://www.codeshare.io/HEjVp
if i Change in dwzUploadClient.php
var dwz_SendForm = false to var dwz_SendForm = true I can submit the form by clicking one but the ProgressBar dont work What is the problem |
|
|