Link to home
Start Free TrialLog in
Avatar of killers376
killers376

asked on

Fatal error: Call to a member function segment() on a non-object

I m trying to add a form in the tpl file smartyclass engine.. Using the inbuilt functions of Code igniter framework of php ..  I want to submit a reply in the forum and the respective forum id should be inserted in to the databse from the url by using  $this->uri->segment() function . Im getting this error

Fatal error: Call to a member function segment() on a non-object in C:\wamp\www\facebook\application\libraries\smartyCore\templates_c\%%F9^F92^F92FFC1F%%forum.tpl.php on line 231

{php}
 echo form_open('user1/insertreplies');
echo form_hidden('forum_id',$this->uri->segment(3));
 {/php}
 
 
 <input type="hidden" name="user_id" readonly value="{$userDetails.user_id}">
  <input type="text" name="subject"  />
  <textarea name="body" rows="15" ></textarea>
  <input type="submit" value="submit"  />
  
  </form>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of GPFGSantos
GPFGSantos

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial