Newbie to Ignite. Please help! Links doesnt work!!!

Please helppp... I m a newbie to Ignite.
I am not able to make the links work. I m following the video tutorial on the website.

like i have this:-

This is TEST

Second Test

this is second test


SO when i click on to Comments- it doesnt work but however if i go by loading the url for the same i am able to get the content!
Please help! what's wrong ??

This is my View file:-


<?php foreach($query->result() as $row):?>


<p>&lt;?=anchor('site/comments/'.$row->id, 'Comments');?&gt;</p>

&lt;?php endforeach; ?&gt;


Thanks Smile

1: do not use short_tags, it's only for lazy programmers :-)
2: use base_url() to get full uri's, you now have one relative to the controller
&lt;?=anchor(base_url().‘site/comments/’.$row->id, ‘Comments’);?&gt;

[quote author="rogierb" date="1253281109"]
2: use base_url() to get full uri's, you now have one relative to the controller
&lt;?=anchor(base_url().‘site/comments/’.$row->id, ‘Comments’);?&gt;

If anything, you'd use site_url as it includes index_page (which is normally empty)
Also, anchor build it using the site URL anyway

Have you got the url helper loaded?

Changed to :-&lt;?=anchor(base_url().‘site/comments/’.$row->id, ‘Comments’);?&gt;

And I get this error:

A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant ‘site - assumed '‘site'

Filename: views/hometest.php

Line Number: 12

I loaded the url helper.
$autoload['helper'] = array('url');

Please Helppp!

Same problem with this.
The form is not getting posted





<p>&lt;textarea name="body" rows="10"&gt;&lt;/textarea></p>
<p>&lt;input type="text" name="author"/&gt;&lt;/p>
<p>&lt;input type="submit" value="Submit Comment" /&gt;&lt;/p>



Have you definatly changed the base_url in the config file?
What are the links it creates?

And use [ code ] tags in future when posting code

The Base url is :
$config['base_url']= "http://localhost/CI/index.php"

I'm not able to post comments. I dont get the error page as well. it directs me a new page all together , like my AVG page when i post a comment. same for the earlier problem. The error page doesnt display as well


the base URL shouldn't include index.php, that's a seperate config item
change it to
$config['base_url']= "http://localhost/CI/

Ok Great .it Works.
Thanks alot :-)

But the insert redirects to another page again!!! new page.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.