Affiliate Programs
 
Search affiliate programs for: 
Affiliate Categories
» Affiliate Networks
» Ad Networks
» 2 Tier Programs
» Pay Per Sale
» Pay Per Lead
» Residual Income
» Datafeeds
» Multi Tier Programs
» Business Opps
» Other Programs

Newsletter
Get newly added affiliate programs by email. Enter your email here:
Article Categories
» Affiliate Marketing
» Business
» Ecommerce
» Hosting
» Marketing
» Sales
» Web Designing
» Webmasters
» SEO & Promotion
» Working At Home
» Other Articles
» Affiliate Glossary


Go Back   AffiliateSeeking Forum > Website Creation, Design & Maintenance > Programming

Programming Get help with creating your scripts/software or help others. Discuss anything relating to programming. Includes PHP, Perl, C++, ColdFusion, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-25-2009, 07:50 AM
ebosysindia ebosysindia is offline
Member
 
Join Date: May 2009
Posts: 32
ebosysindia is on a distinguished road
Default Inserting checkbox values into one field

Hi

I have a checkboxes on my page (.aspx) like

checkbox1 - item1
checkbox2 - item2
checkbox3 - item3
etc

what i want is that when a user selects certain checkboxes
they should be inserted into a table called
customer which has fields (customer id and actions)

the data should be inserted as

customerid actions
1 item1,item2,item3
2 item1,item3
3 etc..

i.e all the values should be inserted into database into one field separated by commas.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-16-2009, 07:43 AM
grim1208 grim1208 is offline
Junior Member
 
Join Date: Jun 2009
Posts: 13
grim1208 is on a distinguished road
Send a message via AIM to grim1208 Send a message via MSN to grim1208 Send a message via Skype™ to grim1208
are you familiar with php? if so perhaps this will help

Code:
//page form gets submitted to after checkbox select
#db connections la la
$customerId = $db['customerId'];
$numItems = count($_POST);
$customerPurchase = array();

for($i=0;$i<=$numItems;$i++)
{
  $data = $customerId + " " + $_POST[$i] + ",";
  array_push($customerPurchase, $data)  ;
}

#php & mysql code to inset $customerPurchase into whatever table la la
I typed this out on the fly without php localhost from friends computer, hope this helps

cheers

grim
newgameprojects.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-16-2009, 05:03 PM
stevepeterson stevepeterson is offline
Member
 
Join Date: Jul 2009
Posts: 50
stevepeterson is on a distinguished road
I think grim1208 answer is right. Have you follow this one ?

Last edited by stevepeterson : 07-16-2009 at 07:26 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:46 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
© 2004-2011 AffiliateSeeking. All rights reserved.