Witam,
Mam formularz który dodaje htmla do bazy.
Zrzut:
if($this->input->post()) {
$this->form_validation->set_rules('tytul', 'tytuł', 'required|min_length[3]|max_length[256]|xss_clean');
$this->form_validation->set_rules('embed', 'embed', 'required|min_length[10]');
$this->form_validation->set_rules('cap', 'kod', 'required|min_length[3]|numeric|matches[nawias]');
if ($this->form_validation->run() == TRUE)
{
$dane = array('tytul' => $this->input->post('tytul'), 'video' => $this->input->post('embed'),
'video_int' => 1,
'kategoria' => $this->input->post('kategoria'),
'ip_dodajacy' => $this->ip,
'data_dodajacy' => $this->data,
'zaakceptowane' => 0);
$this->MUpload->add($dane);
header('Location: '.base_url
('upload/ok.html').''); }
else
{
$data['content'] = $this->load->view('upload/video', '', true);
$this->load->view('index', $data);
}
} else {
$data['content'] = $this->load->view('upload/video', '', true);
$this->load->view('index', $data);
}
Konkretnie chodzi mi o to że dane porabne z pola "embed" automatycznie mi czyści, a potem gdy pobieram z bazy nie chce wyświetlić jako html tylko np:
<iframe width="560" height="315" src="http://www.youtube.com/embed/ieLKVrsDrNY" frameborder="0" allowfullscreen></iframe>
Ktoś ma może jakiś pomysł ?
Ten post edytował motyl-pl 11.11.2012, 02:22:47