Welcome Guest, Not a member yet? Register   Sign In
$_POST problem
#11

[eluser]charlie spider[/eluser]
where is the rest of the controller ?

the error says it is on line 92
Code:
Message: Undefined index: search

Filename: controllers/portal.php

Line Number: 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']


because if you do, and 'search' hasn't been declared anywhere, or has no value, then you would get the "Undefined index" error.
#12

[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']
because if you do, and 'search' hasn't been declared anywhere, or has no value, then you would get the "Undefined index" error.[/quote]
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:
#13

[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 ?
#14

[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
#15

[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.




Theme © iAndrew 2016 - Forum software by © MyBB