CodeIgniter Forums
CI tutorial help please. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: CI tutorial help please. (/thread-53156.html)



CI tutorial help please. - El Forum - 07-12-2012

[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-guide/tutorial/news_section.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;



CI tutorial help please. - El Forum - 07-12-2012

[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/';



CI tutorial help please. - El Forum - 07-13-2012

[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.