Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Closed Thread
 
Thread Tools Display Modes
Share |
  #1  
Old 08-07-2014, 06:17 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
How do i pass 2 Arrays inside a Checkbox Value

I have a table inside that I want to pass empid and week array inside Value data

I am able to get the proper data, but week should come in single Quotes how do i do that

Code:
<td width = 7%> <input type ='checkbox' id = 'Approve' value = '$json_empid[$i] and week = $json_week[$i]' name = 'Music' onclick='')'>Approve</td>
current output getting is

Code:
empid = 100 and week = 2014-05-01
I need date inside single quote

Code:
empid = 100 and week = '2014-05-01'
 

Advertisement

Advertisement

  #2  
Old 08-08-2014, 03:33 AM
mathewj mathewj is offline
Contributing Member
 
Join Date: 05-08-14
Posts: 132
iTrader: 0 / 0%
HTML Code:
<td width = 7%> <input type ='checkbox' id = 'Approve' value = '$json_empid[$i]+" ' "+week = $json_week[$i]+" ' "' name = 'Music' onclick='')'>Approve</td>

Last edited by snakeair; 08-08-2014 at 05:05 PM.
 
  #3  
Old 08-12-2014, 07:04 PM
eagle12 eagle12 is offline
Contributing Member
 
Join Date: 11-30-11
Posts: 137
iTrader: 0 / 0%
Trying to pass 2 pieces of data through 1 variable is very bad form. Why can you use 1 piece for empid and a hidden input for the week? If needed you can use the hidden as an array and the key be the empid. When it gets passed to the processing script it can just reference by the empid.
 
Go Back   Webmaster Forum > Web Development > Coding Forum

Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
i get Login/pass Box everytime i come to the forum! [Pic Inside] crav3 V7N Forum Support 16 02-10-2010 09:26 AM
Checkboxes and arrays gilbertsavier Coding Forum 2 08-06-2009 06:09 AM
problem with PHP and arrays I think Arenlor Coding Forum 4 01-19-2007 11:35 AM
PHP - Using assoc. arrays in SQL string trevHCS Coding Forum 1 09-24-2004 02:49 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:16 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC