$_POST problem - 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: $_POST problem (/showthread.php?tid=9689) Pages:
1
2
|
$_POST problem - El Forum - 07-05-2008 [eluser]charlie spider[/eluser] where is the rest of the controller ? the error says it is on line 92 Code: Message: Undefined index: search i want to see line 92 you only posted like 60 lines of code. Do you have an array anywhere with 'search' as an index ??? ie: Code: $some_array['search'] because if you do, and 'search' hasn't been declared anywhere, or has no value, then you would get the "Undefined index" error. $_POST problem - El Forum - 07-05-2008 [eluser]lampard789[/eluser] [quote author="charlie spider" date="1215296175"]where is the rest of the controller ? the error says it is on line 92 i want to see line 92 you only posted like 60 lines of code. Do you have an array anywhere with 'search' as an index ??? ie: Code: $some_array['search'] I removed all the comments and unnecessary stuffs. The line 92 is the one with echo $_POST['search']. Sorry for the confusion. Derek has pointed out my (bad) mistake below :red: [quote author="Derek Jones" date="1215282356"]Do you have any .htaccess in play? If you are doing a rewrite that redirects or a regular redirect, you will lose POST data between page requests.[/quote] Ah yeah!! you're right. I should've realized it earlier. Need to be more careful next time. Thank you everyone, it works now! :wow: $_POST problem - El Forum - 07-18-2008 [eluser]Brahm[/eluser] Hi Guys, I am getting the same problem. In my local machine works fine at hosting company not. I have a htaccess file: Options +FollowSymLinks Options -Indexes DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L,QSA] When I try to post a form I get always empty values: Array ( ) is there anything to be done ?! What is causing this ? $_POST problem - El Forum - 07-18-2008 [eluser]Brahm[/eluser] [quote author="Brahm" date="1216404456"]Hi Guys, I am getting the same problem. In my local machine works fine at hosting company not. I have a htaccess file: Options +FollowSymLinks Options -Indexes DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L,QSA] When I try to post a form I get always empty values: Array ( ) is there anything to be done ?! What is causing this ?[/quote] Now it is working. I was getting this issue because my domain is a "pointer" domain in my hosting company. I have changed the way my domain is loaded there and now it is working fine. Sds, Brahm $_POST problem - El Forum - 08-24-2008 [eluser]ervinter[/eluser] [quote author="Derek Jones" date="1215282356"]Do you have any .htaccess in play? If you are doing a rewrite that redirects or a regular redirect, you will lose POST data between page requests.[/quote] Hi, Does anybody know how to solve this issue if I have .htaccess in play in order to get my POST data? Thanks. |