POST METHOD PROBLEM (If input http://,ftp://) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: POST METHOD PROBLEM (If input http://,ftp://) (/showthread.php?tid=60951) |
POST METHOD PROBLEM (If input http://,ftp://) - El Forum - 08-08-2014 [eluser]Unknown[/eluser] After I input http:// in textfield or textarea. I can't echo that variable(show nothing). please kindly check code as below. It's work when i test on localhost . But when i test on external server It's not work. And when i tested without CI (only php) like below It's work also. Code: <form method="post" action="doTest.php"> doTest.php Code: <? environment:Codeigniter, Godaddy(php5.4 cpanel) Thank you in advance. This is my code in CI: Simple Code: Controller (Welcome) Code: public function test() View (test.php): Code: <form action='../welcome/doTest' method="post"> work List: aaaaa 'http://' (single quote added) htp :// not work: http:// http://www.example.com ftp:// sorry for poor english, Thank you in advance. POST METHOD PROBLEM (If input http://,ftp://) - El Forum - 08-09-2014 [eluser]InsiteFX[/eluser] It's Controller/Method. Code: <form action='../welcome/doTest' method="post"> POST METHOD PROBLEM (If input http://,ftp://) - El Forum - 08-09-2014 [eluser]Unknown[/eluser] [quote author="InsiteFX" date="1407588668"]It's Controller/Method. Code: <form action='../welcome/doTest' method="post"> I try to use Code: <form action='welcome/doTest' method="post"> Actually, I tested Code: <form action='<?=base_url('welcome/doTest');?> method="post"> It will send to http://mydomain.com/welcome/doTest It's work if I use normal text like: aaa, text But if input protocol name like http://, ftp:// It's not work. POST METHOD PROBLEM (If input http://,ftp://) - El Forum - 08-21-2014 [eluser]Flemming[/eluser] this seems like a similar problem to the one described here: https://ellislab.com/forums/viewthread/246197/ I think the issue could be with mod_security on your live server? POST METHOD PROBLEM (If input http://,ftp://) - El Forum - 08-21-2014 [eluser]InsiteFX[/eluser] it may need the index.php to work switch base_url() with site_url() Code: <form action="<?php echo site_url('welcome/doTest'); ?>" method="post"> |