Welcome Guest, Not a member yet? Register   Sign In
CI tutorial help please.
#1

[eluser]Unknown[/eluser]
hey guys,

I am brand new to CI and have been doing the user documentation tutorial.
This is my first OOP and my first with the CI framework also.
linky here to the DOC's
http://ellislab.com/codeigniter/user-gui...ction.html
now when i submit the form for this tutorial from the create view the URL is doubling up
for example the normal url is localhost/ci/index.php/news/create
after the form submission it is
localhost/ci/index.php/news/createlocalhost/ci/index.php/news/create
This causes the page to error with 404 as page not found.

here is my create view code
Code:
<h2>Create a news item</h2>

&lt;?php echo validation_errors(); ?&gt;

&lt;?php echo form_open('news/create') ?&gt;

<label for="title">Title</label>
&lt;input type="input" name="title" /&gt;&lt;br />

<label for="text">Text</label>
&lt;textarea name="text"&gt;&lt;/textarea><br />

&lt;input type="submit" name="submit" value="Create news item" /&gt;

&lt;/form&gt;
#2

[eluser]Aken[/eluser]
Check your base_url config setting. It needs to be a full URL with a trailing slash.

Code:
$config['base_url'] = 'http://localhost/ci/';
#3

[eluser]Unknown[/eluser]
[quote author="Aken" date="1342154730"]Check your base_url config setting. It needs to be a full URL with a trailing slash.

Code:
$config['base_url'] = 'http://localhost/ci/';
[/quote]

Thanks mate, feel like stupided now the error i made was not haveing HTTP:// before it the rest was right.

Cheers for the help.




Theme © iAndrew 2016 - Forum software by © MyBB