CodeIgniter Forums
problem in redirect method - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: problem in redirect method (/showthread.php?tid=48737)

Pages: 1 2


problem in redirect method - El Forum - 01-27-2012

[eluser]asmaa kamal[/eluser]
@jason

i iput them but got the same error

the config code:

Code:
$config['base_url'] = 'http://localhost/t/';
$config['index_page'] = 'index.php';
$config['uri_protocol'] = 'AUTO';
$config['url_suffix'] = '';



problem in redirect method - El Forum - 01-27-2012

[eluser]Jason Stanley[/eluser]
Click a link. What is the url in your address bar?


problem in redirect method - El Forum - 01-27-2012

[eluser]asmaa kamal[/eluser]
what link you mean ?

sorry for bad english

the link of this page: http://ellislab.com/forums/viewthread/209640/

the link when i use my login code :: when i press loin the lonk is : http://localhost/t/main/login

sorry for Lack of understanding english


problem in redirect method - El Forum - 01-27-2012

[eluser]Jason Stanley[/eluser]
Change

Code:
<?php echo form_open(base_url() . 'main/login')?>

To

Code:
<?php echo form_open(site_url('main/login')?>

base_url is mainly used for linking files which are in your route. site_url is used to access controllers and the such as this takes into account the index.php.




problem in redirect method - El Forum - 01-27-2012

[eluser]asmaa kamal[/eluser]
thanks jason

it works

but there are another problems


i want if email and password is valid>> it redirect to dashboard page

and if not valid password it give me validation message that tell me that the password is wrong

this logic doesnt occur


when i put valid email and password ,it get the link :http://localhost/t/index.php/main/login

and when i put non valid password it doesnt give me validation message that tell me that " password not valid"

thanks for help