Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-09-2011, 08:26 AM #1
- Join Date
- Nov 2011
- Thanked 0 Times in 0 Posts
To save Multiple div values with the same name using php and mysql
How to save multipple div values with the content editable feature with the same name in database using php.
The user can click the div element as many times as he/she wants and can enter the values in the text boxes(that is a small div boxes). Once the user clicks the submit button, all the values that he/she entered should be saved in the database.
I have written code like this to display the box and was working fine.
$board.append('<div class="class1" style="left:20px;top:70px"><div contenteditable class="editable" name = "content"></div></div>');
and the next code with be with a different class outside but the same name inside.
$board.append('<div class="class2" style="left:20px;top:70px"><div contenteditable class="editable" name = "content"></div></div>');
The user can create as many div values as he/she wants.
How to call these values in array using php and save it in the database.
I was able to do the same with the text values with the name of the text box, but when i tried to do the same, i could not run it and was showing error.
I would be glad if somebody could help me out with code.
Last edited by roselotus; 11-09-2011 at 08:28 AM.
11-09-2011, 03:38 PM #2
- Join Date
- Jan 2011
- Thanked 601 Times in 600 Posts
'name' is depreciated and your browser will not understand this.
Looks like you are looking for user input. Is that correct? Why not use forms? Any reason not to?
$board.append is not php
Last edited by sunfighter; 11-09-2011 at 03:41 PM.