Welcome Guest, Not a member yet? Register   Sign In
Newbie to Ignite. Please help! Links doesnt work!!!
#1

[eluser]SonamL[/eluser]
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:-
Test

This is TEST

Comments
Second Test

this is second test

Comments

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:-
html>
<head>
<title><?=$title?></title>
</head>

<body>

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

<h3>&lt;?=$row->title?&gt;</h3>
<p>&lt;?=$row->body?&gt;</p>

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

&lt;?php endforeach; ?&gt;



&lt;/body&gt;
&lt;/html&gt;

Thanks Smile
#2

[eluser]rogierb[/eluser]
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
<code>
&lt;?=anchor(base_url().‘site/comments/’.$row->id, ‘Comments’);?&gt;
</code>
#3

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

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?
#4

[eluser]SonamL[/eluser]
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!
#5

[eluser]SonamL[/eluser]
Same problem with this.
The form is not getting posted


&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?=$title?&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;?=form_open('blog/comment_insert');?&gt;

&lt;?=form_hidden('entry_id',$this->uri->segment(3));?&gt;


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

&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
#6

[eluser]Dam1an[/eluser]
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
#7

[eluser]SonamL[/eluser]
The Base url is :
Code:
$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

Thanks
#8

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

[eluser]SonamL[/eluser]
Ok Great .it Works.
Thanks alot :-)
#10

[eluser]SonamL[/eluser]
But the insert redirects to another page again!!! new page.




Theme © iAndrew 2016 - Forum software by © MyBB