As it says in title, for some reason I can get data from phpMyAdmin to be written down, but I can’t send data to the database. I have no clue why, it worked few times, and out of nowhere it just stopped. $sql = "SELECT * FROM users"; $result = $conn->query($sql); if ($result->num_rows > 0) ..

Read more

Here is the code : $bookings = Booking::where([‘service_provider_id’=> $users->id, ‘status’=> 6])->get(); $serviceCompletedCount = $bookings->count(); $userData[‘service_completed’] = $serviceCompletedCount; and foreach($users as $user) { $bookings = Booking::where([‘service_provider_id’=> $user->id, ‘status’=>6])->get(); $serviceCompletedCount = $bookings->count(); $user[‘service_completed’] = $serviceCompletedCount; } Sourc..

Read more

I’m trying to transfer data from jsTree1 (source: from API Ajax) to jsTree2, using ContextContex Plug-in menu Copy/Cut > Paste, so User can re-leveling their data in jsTree2. So, This is the first jsTree : var hris_Jstree = $(‘#jstree’).jstree({ "core": { "check_callback": true, "themes": { "responsive": true, "variant": "large", "stripes": false, }, "data": { type: ..

Read more

I am making a hotel booking app using Laravel. I am at the part where i have to filter the rooms according to the inputted date. I am using ajax to achieve this. $(‘#check-availability’).on(‘click’, function(){ var checkin_date = $(‘#check-checkin’).val(); $.ajax({ url:"{{url(‘/available_room’)}}/" + checkin_date, dataType: ‘json’, beforeSend:function(){ $(‘#room_list’).html(‘Loading’); }, success:function(res){ var r_html = ”; var input_checkin_date ..

Read more

Hi I have a table in sql like this id data time_in 123 2022-01-17 16:41:25.00000 Now I would like now the differce in hours from data-time_in and today-now I try : $ora_uscita=date("H:i:s"); $in = new DateTime($time_in); $out = new DateTime($ora_uscita); $interval = $out->diff($in); but I have problem with to do it with data Source: Ask ..

Read more

this is my html form to add picture in database. <form id="image_form" method="post" enctype="multipart/form-data"> <p><label>Select Image</label> <input type="file" name="image" id="image" /></p><br /> <input type="hidden" name="action" id="action" value="insert" /> <input type="hidden" name="image_id" id="image_id" /> <input type="submit" name="insert" id="insert" value="Insert" class="btn btn-info" /> </form> i am making ajax picture add,edit delete function in ajax.this is the code ..

Read more