i have
Notice: Undefined index: _ava in C:\xampp\htdocs\otakutangerang_admin\edit_user.phpon line 26
$avatar = $_POST['_ava']; Notice: Undefined index: _skill in C:\xampp\htdocs\otakutangerang_admin\edit_user.php on line 27
$usr_skill = $_POST['_skill']; and this my code
if (isset($_POST['update'])) { $id = $_GET['id']; $email = $_POST['_em']; $fname = $_POST['_fn']; $lname = $_POST['_ln']; $web_usr = $_POST['_web']; $usr_note = $_POST['_note']; $avatar = $_POST['_ava']; $usr_skill = $_POST['_skill']; //Retrieve the user account information by id. if ($object->Update($id, $email, $fname, $lname, $web_usr, $usr_note, $avatar, $usr_skill)) { $msg = "<div class='alert alert-info'><strong>WOW!</strong> Record was updated successfully <a href='index.php'>HOME</a>!</div>"; } else { $msg = "<div class='alert alert-warning'><strong>SORRY!</strong> ERROR while updating record !</div>"; } } if (isset($_GET['id'])) { $id = $_GET['id']; extract($object->Details($id)); } This my form to change and edit the database
<form class="form-horizontal" method="POST"> <div class="box-body"> <div class="form-group"> <input type="hidden" name="id" value="<?php echo $id; ?>"> <label for="inputUserName" class="col-sm-2 control-label">Username</label> <div class="col-sm-10"> <input type="text" class="form-control" id="inputUserName" value="<?php echo $username; ?>" disabled> <p class="help-block"><em>You require permission from Administrators to change it.</em></p> </div> </div> <div class="form-group"> <label for="inputFirstName" class="col-sm-2 control-label">First Name</label> <div class="col-sm-10"> <input type="text" name="_fn" class="form-control" id="inputFirstName" value="<?php echo $fname; ?>"> </div> </div> <div class="form-group"> <label for="inputLastName" class="col-sm-2 control-label">Last Name</label> <div class="col-sm-10"> <input type="text" name="_ln" class="form-control" id="inputLastName" value="<?php echo $lname; ?>"> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-sm-2 control-label">Email</label> <div class="col-sm-10"> <input type="email" name="_em" class="form-control" id="inputEmail" value="<?php echo $email; ?>"> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-sm-2 control-label">Website</label> <div class="col-sm-10"> <input type="text" name="_web" class="form-control" id="inputEmail" value="<?php echo $web_usr; ?>"> </div> </div> <div class="form-group"> <label for="inputEducation" class="col-sm-2 control-label">Education</label> <div class="col-sm-10"> <input type="email" name="_edu" class="form-control" id="inputEducation" placeholder="Education"> </div> </div> <div class="form-group"> <label for="inputNote" class="col-sm-2 control-label">Notes</label> <div class="col-sm-10"> <textarea class="form-control" id="inputNote" value="<?php echo $usr_note; ?>" placeholder="Note" name="_note"></textarea> </div> </div> <div class="form-group"> <label for="inputSkill" class="col-sm-2 control-label">Skill</label> <div class="col-sm-10"> <select class="form-control select2" name="_skill" value="<?php echo $usr_skill; ?>" multiple="multiple" data-placeholder="Skill" > <option value="Rasengan">Rasengan</option> <option value="Chidori">Chidori</option> <option value="Susano'o">Susano'o</option> <option value="Kamehameha">Kamehameha</option> </select> </div> </div> <div class="form-group"> <label for="inputRole" class="col-sm-2 control-label">Role</label> <div class="col-sm-10"> <input type="text" class="form-control" id="inputRole" value="<?php echo $id_admrole; ?>" disabled> <p class="help-block"><em>You require permission from Administrators to change it.</em></p> </div> </div> <div class="form-group"> <label for="inputFile3" class="col-sm-2 control-label">Foto Profil</label> <div class="col-sm-10"> <div class="input-group"> <label class="input-group-btn"> <span class="btn btn-primary"> Browse <input type="file" style="display: none;" accept="image/*" multiple id="file"> </span> </label> <input type="text" class="form-control" name="_ava" value="<?php echo $avatar; ?>" readonly disabled> </div> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" name="update" class="btn btn-danger" value="update">UPDATE</button> </div> </div> </div> <!-- /.box-body --> </form>