Click here to Skip to main content
15,891,762 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Magento e-commerce is a bloatware Pin
pandu web dev14-Aug-14 9:07
pandu web dev14-Aug-14 9:07 
GeneralRe: Magento e-commerce is a bloatware Pin
Richard Deeming14-Aug-14 9:10
mveRichard Deeming14-Aug-14 9:10 
GeneralRe: Magento e-commerce is a bloatware Pin
Syed M Hussain21-Oct-14 5:21
Syed M Hussain21-Oct-14 5:21 
GeneralHow to prevent html and PHP mixing up Pin
pandu web dev10-Aug-14 0:38
pandu web dev10-Aug-14 0:38 
GeneralRe: How to prevent html and PHP mixing up Pin
Kornfeld Eliyahu Peter10-Aug-14 2:11
professionalKornfeld Eliyahu Peter10-Aug-14 2:11 
GeneralRe: How to prevent html and PHP mixing up Pin
Weekendrockstar30-Aug-14 7:32
Weekendrockstar30-Aug-14 7:32 
GeneralRe: How to prevent html and PHP mixing up Pin
Alex Manolescu8-Jan-15 2:17
Alex Manolescu8-Jan-15 2:17 
Questionarray_diff to insert all unchecked checkbox Pin
Jelly Fish916-Aug-14 19:05
Jelly Fish916-Aug-14 19:05 
SQL
is it possible to make INSERT all checkbox values into database when there is not even one checkbox being checked since im using array_diff as shown below?

my problem currently facing is,
when there is a checkbox being checked, it will insert into checked_table and the remainder options which did not selected will insert into unchecked_table.
howewer, when all checkbox didnt being selected, and click on submit button, the value didnt send to my database unchecked_table.



<pre lang="PHP"><?php
	include('connect.php');
	$checked =  ($_POST['date']);
	$unchecked = ($_POST['nondate']);
	$diff = array_diff($unchecked,$checked);
	
            if(isset($_POST['date']))
            {
                foreach ($_POST['date'] as $dateValue)
                {
                $insert="INSERT INTO checked_table ($colm_ladate) VALUES ('$dateValue')";
		mysql_query($insert);
                }
		echo header("location:home.php");
		}
		if (isset($_POST['nondate']))
		{
		foreach ($diff as $dateValue2)
		{
	$insert2="INSERT INTO unchecked_table($colm_lrdate) VALUES ('$dateValue2')";
	mysql_query($insert2);
		}
	echo header("location:home.php");
            }

?>

QuestionInvoicce in PHP Pin
FKM_16-Jul-14 17:06
FKM_16-Jul-14 17:06 
AnswerRe: Invoicce in PHP Pin
PIEBALDconsult16-Jul-14 17:32
mvePIEBALDconsult16-Jul-14 17:32 
GeneralRe: Invoicce in PHP Pin
FKM_16-Jul-14 17:35
FKM_16-Jul-14 17:35 
GeneralRe: Invoicce in PHP Pin
Richard MacCutchan16-Jul-14 22:51
mveRichard MacCutchan16-Jul-14 22:51 
QuestionCreating XML SOAP Request using PHP Pin
MICHAEL DENNIS JOSEPH9-Jul-14 6:36
MICHAEL DENNIS JOSEPH9-Jul-14 6:36 
Questiondemanded apps.... Pin
Akanksha Rawat7-Jul-14 20:21
Akanksha Rawat7-Jul-14 20:21 
AnswerRe: demanded apps.... Pin
Richard MacCutchan7-Jul-14 22:31
mveRichard MacCutchan7-Jul-14 22:31 
Questionhelp 4 coding Pin
Akanksha Rawat7-Jul-14 20:17
Akanksha Rawat7-Jul-14 20:17 
AnswerRe: help 4 coding Pin
Richard MacCutchan7-Jul-14 22:30
mveRichard MacCutchan7-Jul-14 22:30 
QuestionCalling PHP function and return array Pin
Member 1029700324-Jun-14 18:47
Member 1029700324-Jun-14 18:47 
AnswerRe: Calling PHP function and return array Pin
xiaoqiangdiandian27-Jun-14 21:01
xiaoqiangdiandian27-Jun-14 21:01 
QuestionPHP, Sql 2008, Web Services and JSON Pin
Member 1029700320-Jun-14 18:26
Member 1029700320-Jun-14 18:26 
AnswerRe: PHP, Sql 2008, Web Services and JSON Pin
vivekkamate7-Jul-14 1:42
vivekkamate7-Jul-14 1:42 
QuestionSQLServer2005 Pin
MianSaeedShahid19-Jun-14 5:23
MianSaeedShahid19-Jun-14 5:23 
Questionrecommended PHP Framework Pin
Jassim Rahma4-Jun-14 10:12
Jassim Rahma4-Jun-14 10:12 
AnswerRe: recommended PHP Framework Pin
HardikPatel.SE5-Jun-14 4:01
professionalHardikPatel.SE5-Jun-14 4:01 
AnswerRe: recommended PHP Framework Pin
Daniel Lieberwirth (BrainInBlack)28-Jun-14 0:03
professionalDaniel Lieberwirth (BrainInBlack)28-Jun-14 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.