Jump to content

add multiple data & generate the stored data in the same page


How t insert multiple(column) data in one field(row) using php?  

  1. 1. How t insert multiple(column) data in one field(row) using php?

    • ARRAY
      0
    • ADD Option
      0


Recommended Posts

Example in the page

http://www.phpfreaks.com/forums/index.php?action=post;board=16.0;poll

 

what is the coding to make the (Add Option) function

Do i have to embed javascript in the php code or i can use php code?

 

could you show me the coding for this please...i need to add information on multiple location site for

the companies....

 

 

 

hereby i sent an attachment, for your view....used macromedia dreamweaver :-*

 

[attachment deleted by admin]

  • 3 months later...

If you look at the source for that page you'll see the following javascript:

 

var pollOptionNum = 0, pollTabIndex;
		function addPollOption()
		{
			if (pollOptionNum == 0)
			{
				for (var i = 0; i < document.forms.postmodify.elements.length; i++)
					if (document.forms.postmodify.elements[i].id.substr(0,  == "options-")
					{
						pollOptionNum++;
						pollTabIndex = document.forms.postmodify.elements[i].tabIndex;
					}
			}
			pollOptionNum++

			setOuterHTML(document.getElementById("pollMoreOptions"), '<br /><label for="options-' + pollOptionNum + '">Option ' + pollOptionNum + '</label>: <input type="text" name="options[' + pollOptionNum + ']" id="options-' + pollOptionNum + '" value="" size="25" tabindex="' + pollTabIndex + '" /><span id="pollMoreOptions"></span>');
		}

 

Dig around in the source and you'll eventually understand it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.