Hi, so im trying to insert data but i get: > Notice: Undefined index: events html part: <form method="post" action="seating.php> <div class="drop"> <label>Event : <label/> <select name="events" id="dd-events" onchange="getguests(this.value)"> <option value="" disabled selected >Event</option> <?php foreach($retrieve as $r): ?> <option value="<?=$r['event_id']?>"><?=$r['event_name']?></option> <?php endforeach ?> </select> </div> <input type="hidden" name="table_name[]" value='+tablename+'><span class="tableName">'+tablename+'</span> <input type="text" name="guestname[]" class="add-name" size="40"> </form> php: <?php if(isset($_SESSION['sess_user_id'])) { if(isset($_POST['save-seating'])) { require "connection.php"; $name = $_POST['guestname']; $table = $_POST['table_name']; $event = $_POST['events'];//<- THIS LINE $sess = $_SESSION['sess_user_id']; $seats = $dbh->prepare("INSERT INTO tables(tuser_id,table_name,event_id,guest_name) VALUES(?,?,?,?)"); for($i = 0; $i < count($_POST['guestname']); $i++) { if(trim($_POST['guestname'][$i]) != '') { $seats->bindParam(1, $sess); $seats->bindParam(2, …

Member Avatar
Member Avatar
+0 forum 2

hello. i have a contact page that has a table populated by data from database. when a user clicks on a name a popup appears with that names data so user can edit/update. in that popup there is one drop down named salutations. say that drop down is not edited but only house address is updated when button update is clicked i get notice/warning: > Notice: Undefined index: salutations in C:\Xampp\htdocs\EMS2\updateContact.php on line 5 > Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in C:\Xampp\htdocs\EMS2\updateContact.php on line 27 php: <?php if(isset($_POST['updateC'])) { …

Member Avatar
Member Avatar
+0 forum 2

The End.