Jump to content

Recommended Posts



<?php require_once("../includes/config.php"); ?>
defined('DB_SERVER') ? null : define("DB_SERVER", "test5");
defined('DB_USER') ? null : define("DB_USER", "test1");
defined('DB_PASS') ? null : define("DB_PASS", "password");
defined('DB_NAME') ? null : define("DB_NAME", "DataLog");

<?php require_once "../includes/initialize.php" ?>
<?php

define('SITE_ROOT', 'C:'.DS.'xampp'.DS.'htdocs'.DS.'PhpProject1');
defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'includes');


// load config file first
require_once LIB_PATH.DS.'config.php';

?>

ignore this part <?php include_layout_template('header.php'); ?>

well at a glance, you have given your table two different id's and you have not put any value parameters in any of your option elements, you have not assigned a name parameter to your last select element and you are only collecting member id's in your abc[] array element, not the data you have been previously stating.

 

Here's a debugging tip : add the following line at the very top of update3.php (but still after the <?php tag)

die(var_dump($_POST));
then fill out your form as you would expect it to be used and submit it.  Post up what you get back from the update3.php page.

 

below is value for ($_post['abc'])

 

0=>'1','xyz','06/08/2015

1=>'2','pqr','07/08/2015

 

No, it doesn't according to your form code

 

<input id="abc" type="checkbox" name=abc[] " value="' . $row['memberid'] . '" ">

 

That's why.

you are right but I was trying to explain my problem in short form so it would not waste your time.

 

Can you please help me?

 

I am getting value for post_abc like this

 

0=>'3',dave,Read,06/09/2015

 

its selected value from checkbox. now I want to update selected value in sql server.

 

I am sorry if I am not able to explain you properly. I am beginner. I hope you understand.

 

Appricate your help.

It took you until reply #30 to show an accurate version of the POST contents with var_dump($_POST). When you finally did, you chose to show it without any data ::) which was as much use as a chocolate teapot.

 

Now you claim it looks like

 

0=>'3',dave,Read,06/09/2015

so it looks like an extra element has crept in from somewhere.

 

You also say that you want to update the database. No statement of exactly what that update should do. Do you think we can can read your mind?

 

Sorry but getting the information required to help you is like getting blood out of a stone and life is too short.

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.