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]

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.