查看文件: body_kindgoadd.php
大小: 2.32 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php $write=''; if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $aeimg=$_POST['aeimg']; $aeimgext=$_POST['aeimgext']; $tfile="fileToUpload1"; if($_FILES[$tfile]["name"]<>''){ $imgext=''; $ext= explode('.',$_FILES[$tfile]['name']) ; $aeimgext=strtolower($ext[count($ext)-1]); //取最後一筆 $pic=$wwwpath.$picpath.$aeimg.".".$aeimgext; move_uploaded_file($_FILES[$tfile]["tmp_name"],$pic); } $updateSQL = sprintf("update big5link set aedoc='%s',aelink='%s',aeimg='%s',aeimgext='%s',linktag='%s' WHERE ae1='%s'",$_POST['aedoc'],$_POST['aelink'],$aeimg,$aeimgext,$_POST['linktag'],$_POST['ae1']);//$_POST['ae1'] mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $write='資料已更新...'; $insertGoTo = $_POST['url']; // header(sprintf("Location: %s", $insertGoTo)); echo "<script>alert('".$write."');location.href='".$_POST['url']."';</script>"; } $currentPage = "productadd.html";//$_SERVER["PHP_SELF"]; ?> <div class="main "> <div class="row"> <div class="col-lg-12"> <form action="kindgoadd.html" method="post" name="form2"> <input name="pic_num" id="pic_num" type="hidden" value="230420141810"> <table class="table table-bordered table-hover"> <tr> <td width="362"> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <div class="row"> <div class="form-group"> <div class="col-md-4"> <label>新增產品分類</label> 名稱 <br> <input type="text" id="p_size" name="p_size" class="form-control" required="required"> </div> <div class="col-md-2"></div> </div> </div> </td> </tr> <tr> <td> <div class="row"> <div class="form-group"> <div class="col-md-12"></div> </div> </div> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <input type="hidden" id="MM_update" name="MM_update" value="form2" > <input type="submit" name="Submit" value="確定新增" class="btn btn-3d btn-black btn-md"></td> </tr> </table> </form> </div> </div> </div>
保存
取消
返回文件列表