Organizational Research By

Surprising Reserch Topic

undefined index in zend framework

undefined index in zend framework  using -'php,zend-framework'

Here is my simple form:

<form action = "input" method = "POST">
Name: <input type="text" name="uname"/> <br>
<input type="submit" name="button" value="hit it" >

Here is my controller:

public function indexaction()
    $db= new DataBase();
    $db->initDB("testform", "benjaminsform");
        if(isset($_POST["button"])) {

    return array();

And this is the error im receiving"

  Notice: Undefined variable: uname in /usr/local/zend/var/apps/http/v-hrswebapps/80/benjamintestapp/1.0.0_201/module/Application/src/Application/Controller/IndexController.php on line 27
  Line 27 the one in question is the $success statement.

Ive tried working with my isset statements but nothing is really passing into the array.

asked Oct 23, 2015 by rajeshujade
0 votes

Related Hot Questions

1 Answer

0 votes
answered Oct 23, 2015 by sameer rathore