$_GET doesn't work |
[eluser]penta997[/eluser]
Helo. Does someone know, why I cant get value from $_GET?? This is my form code: Code: <div id="wyszukiwarka"> and this is part of controller: Code: function get_books_by_keyword($key='') When I'm running an application the text field is empty.
[eluser]Cristian Gilè[/eluser]
Set uri_protocol in your config.php to PATH_INFO. Cristian Gilè
[eluser]steelaz[/eluser]
I would also recommend using site_url() when building URLs in CodeIgniter, so instead of Code: action="<?php echo base_url();?>index.php/ksiegarnia/get_books_by_keyword" use Code: action="<?php echo site_url('ksiegarnia/get_books_by_keyword'); ?>"
[eluser]InsiteFX[/eluser]
If running CI 2.0.0 Try this in application/config/config.php : Code: $config['allow_get_array'] = TRUE; InsiteFX
[eluser]penta997[/eluser]
Quote:I would also recommend using site_url() when building URLs in CodeIgniter, so instead ofdoesnt work. Quote:Set uri_protocol in your config.php to PATH_INFO. Still the smae error "Undefined index: szukaj"
[eluser]penta997[/eluser]
Now I ahve :"The URI you submitted has disallowed characters."
[eluser]penta997[/eluser]
Ok maybe is an another solution .I've decided to use a $GET instead $this->input->post() becouse $this->input->post() did not work. My problem is connected with text filed. I want to serch results based on word witch I'll write into this filed. And display it into the view. But in my pagination function only items from first link displaying, when I'm click in 2nd link and site was reload the value from text field lost and there are displaying all of item from my table. Just like in sql statement like function have '%%' instead '%word%'
[eluser]nedimtx[/eluser]
Why don't you try: Uri class: http://ellislab.com/codeigniter/user-gui...s/uri.html |
Welcome Guest, Not a member yet? Register Sign In |