Page 1 of 1

php not reading select values added at runtime

Posted: Sun Jun 14, 2009 1:47 am
by ashutosh.options4u
Hi,

I've written a code in which i add items in a select(multiple) box at runtime using Javascript.
I've given the name as 'manualsubject[]' and the values are being added fine.

The problem is that when i read the value of this select in php, using:

$manualsubject = $_POST['manualsubject'];

It displays blank values.

I am not able to figure out why is this happening...

Thanking you in advance for any help

Re: php not reading select values added at runtime

Posted: Sun Jun 14, 2009 7:07 am
by miro_igov
There is no reason to have such behavior in php so i think your javascript is wrong. This forum is for PHP but i can take a look in your js and troubleshoot if you post here.

Re: php not reading select values added at runtime

Posted: Mon Jun 15, 2009 8:17 pm
by ashutosh.options4u
I solved it myself.

The problem was I was not selecting the items after adding it in the list.

By the way thx for the reply.