Welcome Guest, Not a member yet? Register   Sign In
Form Tags disappear
#1

[eluser]pgsjoe[/eluser]
Tried checking the forums first, didn't really see anything about this. And sometimes, I almost think maybe one or two of you out there appreciate my questions, because they're usually something very simple I'm just overlooking.

Well here's my problem, I can't get the form_open function to display in the browser. Which, wouldn't be so weird, but it's omitting my closing 'form' tag from the page as well. Kind of weird, right? Here's what I'm working with. It's pulling in the header and even loading the correct view, but the form...just yeah. Specifically working with the add_photos function.

Code:
<?php
class Photos extends Controller {

    function Photos()
    {
        parent::Controller();
        $this->load->helper('url');
        $this->load->helper('form');
        
        $this->load->scaffolding('photos');
    }
    
    function index()
    {
        $data['query']        = $this->db->get('photos');
        
        $this->load->view('photoList', $data);
    }
    
    function add_photos()
    {
        $data['header']        = "Add Photos";
        
        $this->load->view('photoForm', $data);
    }
}
?>
photoForm.php
Code:
<div id="contentArea">
    <div id="primaryContent">
        <h2>&lt;?=$header?&gt;</h2>
        
        &lt;?=form_open('photos/photo_insert');?&gt;
        
        <p><label for="photoTitle">Title</label>
            &lt;input type="text" name="photoTitle" /&gt;</p>
        <p><label for="photoAlt">Alt</label>
            &lt;input type="text" name="photoAlt" /&gt;</p>
        <p><label for="photoDirectory">Directory</label>
            <select name="photoDirectory">
                <option value="test1">Test 1</option>
                <option value="test2">Test 2</option>
                <option value="test3">Test 3</option>
            </select></p>
        <p><label for="photoFile">File</label>
            <select name="photoFile">
                <option value="test1.jpg">test1.jpg</option>
                <option value="test2.jpg">test2.jpg</option>
                <option value="test3.jpg">test3.jpg</option>
            </select></p>
        
        <p>&lt;input type="submit" name="submit" value="add photo" /&gt;</p>
        
        &lt;/form&gt;
        
    </div>
    
    <div id="secondaryContent">
        <img src="&lt;?=$root?&gt;assets/css/logo.jpg" width="160" height="40" />
        <div id="contactInfo">
            &lt;?php include ($directory . 'includes/contactInfo.php'); ?&gt;
        </div>
    </div>
    <div class="clear"></div>
</div>


Messages In This Thread
Form Tags disappear - by El Forum - 02-16-2008, 11:10 AM
Form Tags disappear - by El Forum - 02-16-2008, 04:13 PM
Form Tags disappear - by El Forum - 02-16-2008, 09:03 PM
Form Tags disappear - by El Forum - 02-16-2008, 09:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB