[ slobodanka @ 28.06.2013. 23:30 ] @
Gde je greska: www.sabiranje.php u delu controllers je: <?php class Sabiranje extends CI_Controller { function index() { echo "Sabiranje 2 broja "."</br>"."</br>"; $this->load->view('sabiranje_view'); } } ?> www.sabiranje_view.php u delu views je: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Sabiranje 2 broja</title> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; } --> </style></head> <body> <form id="form1" name="form1" method="post" target="_self" action="http://localhost/CodeIgniter/index.php/sabiranje"/> <label>Broj 1: <input type="text" name="br1" value="<?php echo $_POST["br1"] ?>" /> </label> <p> <label>Broj 2: <input type="text" name="br2" value="<?php echo $_POST["br2"] ?>" /> </label> </p> <p> <label>Rezultat : <input type="text" name="rez" value="<?php $rez=$br1+$br2; echo $rez; ?>" /> </label> </p> <label> <input type="submit" name="Šalji !" value="Submit" /> </label> </form> </body> </html> Kako da pravilno unesem podatke i da ih obradim |