Page 1 of 1

So bearbeiten Sie Datensätze mit Codesigniter

Posted: 19 Aug 2025, 08:05
by Anonymous
Wie bearbeite ich meine Datensätze? Ich komme immer wieder auf falsche Seiten. Danke im Voraus brauche wirklich Hilfe
Ich habe meinen Code in meiner Löschfunktion, die ich von gestern bekommen habe

Code: Select all

    function update()
{
$booking=array(
'name'=>$this->input->post('name'),
'nationality'=>$this->input->post('nationality'),
'number_of_guest'=>$this->input->post('number_of_guest'),
'date'=>$this->input->post('date'),
'package'=>$this->input->post('package'),
'request'=>$this->input->post('request')
);

$this->site_model->update_record($booking);
$this->edit();
}
< /code>

Site_Model < /p>

      function update_record($booking)
{
$this->db->where('id', 1);
$this->db->update('booking', $booking);
}
< /code>

edit.php



Update



 Guest name(s): 


Nationality: 


 Number of Guest:


 Date of Arrival:



Choose Package to avail
Package A. Half - day City Tour
...
Package B. Honda Bay Island Hopping
Package C. St. Paul's Subterranean River National Park or Underground River


 Other Request: 





< /code>

Meine Ansichtsseite .. (WHRE MEINE BITTE UND LEBENSETTE) < /p>