javascript - save selected options [<select> values in database -


i need save selected options values in database . in form, need include select options inside input type , have code.

<form method="post">     <td>designer order number </td>     <td>         <div id="ordernumbers">             <select>                 <option>select order</option>             </select>         </div>     </td>     <input type="text" name="duedate" value=""/>     <input name="register1" type="submit" id="btnsubmit" value="update"  onclick="return updatepayment(); "/> </form> 

enter image description here

to include select option inside form , tried link1 did't worked me.

than i followed below code in mentioned in link2

<form>     <td>         <div id="ordernumbers">             <input type="text" name="designerorder_id" list="citynames">             <datalist id="citynames">                 <option>select order</option>             </datalist>         </div>     </td> </form> 

still getting notice: undefined index: designerorder_id error , instead of above code , if use code : <input type="text" name="designerorder_id" /> not getting error, guess doing in mistake in putting select inside input in form, please me this....

edit

if (isset($_post['register1'])) {    $designerorder_id = trim($_post['designerorder_id']);   $product_id = trim($_post['product_id']);   $paid_status = password_hash($_post['paid_status'], password_default);   $due_date = trim($_post['due_date']);    $stmt = $reg_user->runquery("select * order_details");   $row = $stmt->fetch(pdo::fetch_assoc);   $stmt->execute();       if ($reg_user->register1($designerorder_id, $product_id, $paid_status, $due_date)) {       $id = $reg_user->lasdid();       $key = base64_encode($id);       $id = $key;        $message = " updated database";     //   $subject = "confirm updation";      //  $reg_user->send_mail($email, $message, $subject);       $msg = "database updated ";      } else {       echo "sorry , query no execute...";     }   } 

note : requesting downvoter, please inform in comments reason downvote can correct it....


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -