• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not redirect to...

help me i have a minimal problem and i dont know what to do i hope that you can help me guys.
Here's my controller:
class Blog extends CI_Controller{
public function __construct(){
public function index(){
$data['webtitle'] = 'Post List';
$data['pageheader'] = 'Blog List';
$data['post'] = $this->blogmodel->getAllPost();


public function createpost(){
$data['webtitle'] = 'Create Post';
$data['pageheader'] = 'Create New Post';


if($this->form_validation->run() === FALSE){
Here's my view named 'view.php' for displaying post and provide a link for adding new post
echo "<a href='blog/createpost'>ADD NEW POST?</a><BR />";
foreach($post as $row){
echo "ID: ".$row['id']."<br />";
echo "TITLE: ".$row['title']."<br />";
echo "MESSAGE: ".$row['body']."<br />";
echo "DATE CREATED: ".$row['created']."<br />";
echo "DATE MODIFIED: ".$row['modified']."<br />";
echo "<hr />";
Here's my create.php view

&lt;?php echo form_open('blog/createpost'); ?&gt;
&lt;input type="text" name="title" size="30" /&gt;&lt;br />

&lt;textarea name="message" cols="50" rows="10"&gt;&lt;/textarea><br />

&lt;input type="submit" value="CREATE POST" /&gt;
The problem is i cannot redirect the page to create.php which is my view in creating a new post. How can i solve my link problem?

provide your errors!!

to make it easier for us to help you please wrap your code snippets in the bb - code tag.

also, provide us with any error message your are getting.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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