Welcome Guest, Not a member yet? Register   Sign In
Problem form_open
#1

[eluser]new developer[/eluser]
Dear guys
Any help is appreciated. I installed Codeignitor on WAMP server. I made a login form using form_open('welcome/verify') helper function. I am getting http://localhost/CMS/ /welcome/verfiy rather http://localhost/CMS/welcome/verfiy. Do i have to set any config option to rectify this.
#2

[eluser]pointer[/eluser]
did you check in system/application/config/config.php

$config['base_url']
#3

[eluser]new developer[/eluser]
I have set my baseurl as this...
$config['base_url'] = "http://localhost/CMS";
#4

[eluser]new developer[/eluser]
My Code is here after
<html>

<div id=’pleft’ >
<h2> Please login to Access the Dashboard </h2>
&lt;?php
if ($this-> session-> flashdata(‘error’)){
echo "<div class=’message’>";
echo $this-> session-> flashdata(‘error’);
echo "</div>";
}
?&gt;
&lt;?php
$udata = array('name'=> 'username','id'=> 'u','size'=> 15);
$pdata = array(‘name’=> ’password’,’id’=> ’p’,’size’=> 15);
echo form_open('welcome/verify');
echo "<p> <label for=’u’> Username </label> <br/>";
echo form_input($udata) . " </p>";
echo "<p> <label for=’p’> Password </label> <br/>";
echo form_password($pdata) . "</p>";
echo form_submit(‘submit’,login);
echo form_close();
?&gt;
</div>
&lt;/html&gt;
#5

[eluser]barbazul[/eluser]
in your config file, check the value of index_page it should be an empty string or index.php

remember that ' ' is not an empty string
#6

[eluser]barbazul[/eluser]
Code:
/*

|--------------------------------------------------------------------------

| Base Site URL

|--------------------------------------------------------------------------

|

| URL to your CodeIgniter root. Typically this will be your base URL,

| WITH a trailing slash:

|

|    http://example.com/

|

*/

$config['base_url']    = "http://localhost/CMS";



/*

|--------------------------------------------------------------------------

| Index File

|--------------------------------------------------------------------------

|

| Typically this will be your index.php file, unless you've renamed it to

| something else. If you are using mod_rewrite to remove the page set this

| variable so that it is blank.

|

*/

$config['index_page'] = "";
#7

[eluser]new developer[/eluser]
Thanks for the help...I worked..thank you very much




Theme © iAndrew 2016 - Forum software by © MyBB