php not reading select values added at runtime

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ashutosh.options4u
Forum Newbie
Posts: 2
Joined: Sun Jun 14, 2009 1:41 am

php not reading select values added at runtime

Post 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
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Re: php not reading select values added at runtime

Post 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.
ashutosh.options4u
Forum Newbie
Posts: 2
Joined: Sun Jun 14, 2009 1:41 am

Re: php not reading select values added at runtime

Post 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.
Post Reply