Undefined variable: name in D:\xampp\htdocs\phonereporting\application\views\s cripts\student\StudentFormVS.phtml on line 59
error here is tag i cannot retrieve name value from database
pls help me form name is StudentFormVS.phtml how to incluse one field value to this form
Expand|Select|Wrap|Line Numbers
- <body onload=" document.getElementById('firstname').focus();">
- <form name='studentform' method="post" action="<?php echo $this->element->getAction(); ?>">
- <div class="adb-1-2std">
- <!--Content Starts-->
- <!--Course details-->
- <div class="ads-5N">
- <div align="right" class="td ads-5-1"> </div>
- <div align="right" class="td ads-5-2">First Name<span class="Req gen-87">*</span></div>
- <div align="left" class="ads-5-3"><?php echo $this->element->firstname; ?></div>
- <div align="right" class="ads-5-4">Surname<span class="Req gen-87">*</span></div>
- <div align="left" class="ads-5-3"><?php echo $this->element->surname; ?></div>
- <!-- Start First Name error !-->
- <?php $errorfn = $this->element->firstname->getMessages();
- $errorsn = $this->element->surname->getMessages();
- if(!($errorfn == null && $errorsn == null)){ ?>
- <div align="left" class="ts-5-7">
- <?php foreach ($errorfn as $value ) {
- echo $value;
- }
- ?>
- </div>
- <!-- Ends First Name error !-->
- <!-- Start Surname error !-->
- <div align="left" class="ts-5-71" >
- <?php $errorsn = $this->element->surname->getMessages();
- foreach ( $errorsn as $value ) {
- echo $value;
- }
- echo "</div>";
- }
- ?>
- <!-- Ends Surname error !-->
- <div align="right" class="td ads-5-6">Supervisor Name</div>
- <div align="left" class="ads-5-7"><?php echo $this->element->supervisorname; ?></div>
- <div align="right" class="ads-5-8">Employee No</div>
- <div align="left" class="ads-5-7"><?php echo $this->element->employeeno; ?></div>
- <!-- Start Enter Employee No error !-->
- <div align="left" class="ts-5-71">
- <?php $errors = $this->element->employeeno->getMessages();
- foreach ( $errors as $value ) {
- echo $value . '<br/>';
- }
- ?>
- </div>
- <!-- Ends Enter Employee No error !-->
- <div class="gen-88"></div>
- </div>
- <div class="ads-6Std">
- <div class="td band">
- <div class="Add_btn"><input type="button" value="Add" class="button"/ onclick="window.open('/student/pharmacy','','width=790,height=500,left=180,top=140,scrollbars=yes');"></div>
- <div class="Add_crs2" align="left"><strong > Pharmacy </strong>
- </div>
- </div>
- <div class="Add_Crs1">
- <?php echo $this->element->branches; ?>
- <?php $this->element->$name ;
- ?>
- </div>
- <div class="gen-88"> </div>
- </div>
- <div class="ads-7">
- <div class="td band">
- <div class="Add_btn"><input type="button" value="Add" class="button"/ onclick="window.open('/student/course','','width=790,height=500,left=180,top=140,scrollbars=yes');"></div>
- <div class="Add_crs2" align="left"><strong > Course</strong></div>
- </div>
- <div class="Add_Crs">
- <div class="Add_Crs1">
- <?php echo $this->element->courses; ?>
- </div>
- </div>
- </div>
- <div ></div>
- <div class="ads-7">
- <div class="td band"></div>
- </div>
- <div class="ads-8">
- <div align="center" class="adc-6-1">
- <input type="submit" value="Save" class="button"/>
- <input type="reset" value="Reset" class="button"/>
- <input type="button" name="cancel" value="Cancel" onclick="javascript:window.location='/student/list'" class="button"/>
- </div>
- <div class="gen-88"></div>
- </div>
- <!--Course details ends-->
- <?php echo $this->element->id; ?>
- <?php echo $this->element->addedBranch; ?>
- <?php echo $this->element->addedCourse; ?>