Hi ppl

yestday i posted a thread and that issue was solved, but a similar issue is raised again. this time,
1)i am populating the options(eg: base material, film, glass pane) in dropdown from database.
2)user selects a option, enters other details and click submit.
3)on clicking submit, all the info from the form is saved into another table in database.

now the issue is, on clicking submit, if the option chosen is base material, only base is getting posted.

aaah what cud be the reason??

i ll post the code snippet soon..until then can anyone help out here..


6 Years
Discussion Span
Last Post by puvi

thanks chris

<select name="component" id="component" >

	while($rowComp = mysql_fetch_array($resComp))
	echo "<option id=".$rowComp['id']." value=".($rowComp['name']).">".($rowComp['name'])."</option>";

this is where i have the issue i guess, cos the options are getting populated n the 1st word gets printed. pls have a look at the code and suggest me how to get it to work..

thanks again..


If the value contains blanks then you lose whatever is after the blank. Try this:

echo "<option id=".$rowComp['id']." value=\"".($rowComp['name'])."\">".($rowComp['name'])."</option>";

Edited by chrishea: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.