textfield onblur event - javascript

I have this text field
<?php if($row_questionset['Constructor']=="TextField"){?>
<?php while ($row_Answer=mysql_fetch_array($AnswersValue)){ ?>
<fieldset class="field" >
<?php $question=$row_questionset['QuestionIDFKPK'];?>
<span class="symbol">
<?php echo $row_questionset['QuestionValue']; ?>
<input class="validate[required] text-input" type="text" name="sampletextanswer<?= $row_Answer['QuestionIDFK'];?>[]" id=" < ?php echo $question ?> " value="<?= $answerSelect=$row_Answer['AnswerIDPK'] ; ?>" onblur="textfieldfocus()" <?php if ($row_Answer['UserAnswer']!='') {echo "checked=checked";} ?> >
</span>
</fieldset>
<?php } ?>
<?php } ?>
And i tried with these scripts for save in a table usage the info that user introduce on texfield each time that he click on it but don't works.What can i do ?
<script>
function textfieldfocus(){
var node_list = document.getElementsByTagName('input');
for (var i = 0; i < node_list.length; i++) {
var node = node_list[i];
if (node.getAttribute('type') == 'text'){
UpdateItem('<?php echo $US_ID ?>;' + this.id + ';' + this.value);
}
}
};
</script>

Related

How to add while using loop?

I have created a code that adds input values and display the result in the third input box but the result is always Nan, how to solve this?
<?php
for ($i=0; $i < 5 ; $i++) {
?>
<input type="number" name="" id="pop<?php echo $i; ?>" >
<input onKeyup="su<?php echo $i; ?>();" type="number" name="" id="ta<?php echo $i; ?>">
<input type="number" name="" id="display<?php echo $i; ?>">
<br>
<script>
function su<?php echo $i; ?>(){
var x = document.getElementById("pop<?php echo $i; ?>");
var y = document.getElementById("ta<?php echo $i; ?>");
var sum;
if (y != ''){
sum = parseFloat(x + y);
document.getElementById("display<?php echo $i; ?>").value = parseFloat(x + y);
}
}
</script>
<?php
}
?>
You need to get the value from the pop and ta and add those, NOT the elements themselves. SEE:
function su<?php echo $i; ?>(){
var x = parseFloat(document.getElementById("pop<?php echo $i; ?>").value); // HERE
var y = parseFloat(document.getElementById("ta<?php echo $i; ?>").value); // HERE
var sum;
if (y != ''){
sum = parseFloat(x + y);
document.getElementById("display<?php echo $i; ?>").value = x + y;
}
}
</script>
Change these 2 lines.
Before:
var x = document.getElementById("pop<?php echo $i; ?>");
var y = document.getElementById("ta<?php echo $i; ?>");
After:
var x = document.getElementById("pop<?php echo $i; ?>").value;
var y = document.getElementById("ta<?php echo $i; ?>").value;
Can not create dynamic function.
Pass dynamic value to the function.
PHP
<?php
for ($i=0; $i < 5 ; $i++) {
?>
<input type="number" name="" id="pop<?php echo $i; ?>" >
<input onKeyup="su(<?php echo $i; ?>);" type="number" name="" id="ta<?php echo $i; ?>">
<input type="number" name="" id="display<?php echo $i; ?>">
<br />
<?php
}
?>
Javascript
function su(id){
var x = document.getElementById("pop"+id);
var y = document.getElementById("ta"+id);
var sum;
if (y != ''){
sum = parseFloat(x + y);
document.getElementById("display"+id).value = parseFloat(x + y);
}
}

buttons and the links make an HTTP request to the file, which will filter the table created :

after enter 3 type of words (alphabetic numeric and alphanumeric in html file. on second page we need to create button and links which will take us to third page. if we click first button it should show us only alphabetic. second button should show only numeric.
someone please help!!
file second:
$sentence = isset($_GET["phrase"]) ? $_GET["phrase"] : $_GET["phrase"];
$w = transformer($sentence);
$sentence = isset($_GET["filter"]) ? $_GET["filter"] : $_GET["filter"];
$w = transformer($sentence);
?>
<table>
<tr>
<th>Word</th>
<th>Length</th>
<th>Type</th>
<tr><td>
<?php
for ($x = 0; $x < count($w); $x++) {
echo "$w[$x] <br>";
}
?> </td>
<td> <?php
for ($x = 0; $x < count($w); $x++) {
$length = strlen($w[$x]);
echo "$length <br>";
}
?>
</td>
<td> <?php
for ($x = 0; $x < count($w); $x++) {
if (ctype_alpha($w[$x])) {
echo "Alphabetic <br>";
} else if(ctype_digit($w[$x])) {
echo "Numeric <br>";
} else {
echo "Alphanumeric <br>";
}
}
?>
</td>
</tr>
</tr>
<?php
function transformer($words){
$w = explode(' ', $words);
return $w;
}
function validation($words){
if($words == null || $words == ""){
echo "Submission will not proceed";
return false;
}
else if(!is_numeric($words)){
echo "Submission will proceed";
return false;
}
return true;
}
?>
<form action="PhraseFilter.php" method="get">
<input type="hidden" name="phrase" value="<?php echo
$_POST["phrase"]?>"/>
<input type="hidden" name="filter" value="TBD"/>
<input type="submit" value="show alpha"
onclick="document.getElementById('filter').value = 'alphabetic';"/>
<input type="submit" value="Show number"
onclick="document.getElementById('filter').value = 'numeric';" />
</form>
</div>
</body>
Second file
$sentence = isset($_POST["phrase"]) ? $_POST["phrase"] : $_GET["phrase"];
$w = transformer($sentence);
$sentence = isset($_POST["filter"]) ? $_POST["filter"] : $_POST["filter"];
$w = transformer($sentence);
?>
<table>
<tr>
<th>Word</th>
<th>Length</th>
<th>Type</th>
<tr><td>
<?php
for ($x = 0; $x < count($w); $x++) {
echo "$w[$x] <br>";
}
?> </td>
<td> <?php
for ($x = 0; $x < count($w); $x++) {
$length = strlen($w[$x]);
echo "$length <br>";
}
?>
</td>
<td> <?php
//for ($x = 0; $x < count($w); $x++) {
if ((ctype_alpha(substr($w[$x])){
echo "Alphabetic <br>";
} else if(ctype_digit(substr($w[$x])) {
echo "Numeric <br>";
}
// }
?>
</td>
</tr></tr>
<?php
function transformer($words){
$w = explode(' ', $words);
return $w;
}
// Validations
function validation($words){
// Validation if Empty
if($words == null || $words == ""){
echo "Submission will not proceed";
return false;
}
// Validation if Valid Number
else if(!is_numeric($words)){
echo "Submission will proceed";
return false;
}
return true;
}
?>
<?php
?>
</div>
</body>

Trying to use JavaScript to calculate total booking price for selected seats using php pdo?

I am trying to use JavaScript to calculate total price for the tickets which are selected by using the checkbox. The result is should be shown in a alert window by clicking on the check button which invokes the JavaScript function. But when I click the button nothing happens. I don't even get any error message. I am a beginner so please if anyone can help me, I will be extremely thankful.
<?php foreach ($res as $row): ?>
<form action="book.php" method="get">
<tr><td><?php echo $row['RowNumber']; ?></td><td><?php echo $row['Price']; ?></td>
<td><input type="checkbox" type="hidden" name="myForm[<?php echo $row['RowNumber']; ?>][row]" id="row" value="<?php echo $row['RowNumber']; ?>"></input></td></tr>
<input type="hidden" name="myForm[<?php echo $row['RowNumber']; ?>][price]" id="price" value="<?php echo $row['Price']; ?>"></input>
</form>
<?php endforeach; ?>
</table>
<form action='book.php' method='get'>
Enter Email:<input type='text' name='name'></form>
<script>
function summary() {
var total = 0.0;
var seats = document.getElementById("row").value;
for(i = 1; i <= document.getElementById("row").value; i++) {
if(document.getElementId("row").checked) {
total = total + parseFloat(document.getElementById("price").innerHTML);
}
}
return total;
alert("Price of seats =" + total);
}
</script>
<input type="button" onclick="summary()" value="check">
<?php
You're returning before calling the alert, which means you never get to the alert itself. Remove the return total line.
This is a very common problem.All we have face atleast once.you should use Chrome istead of firefox or internet explorer.close your webpage and restart again.
return total should be after alertbox.
thankx.
You can try this sample
<form action="book.php" method="get">
<table>
<?php foreach ($res as $row): ?>
<tr data-rownumber="<?php echo $row['RowNumber']; ?>">
<td><?php echo $row['RowNumber']; ?></td>
<td><?php echo $row['Price']; ?></td>
<td>
<input type="checkbox" name="myForm[<?php echo $row['RowNumber']; ?>][row]" id="row-<?php echo $row['RowNumber']; ?>" value="<?php echo $row['RowNumber']; ?>" onclick="summary()" />
<input type="hidden" name="myForm[<?php echo $row['RowNumber']; ?>][price]" id="price-<?php echo $row['RowNumber']; ?>" value="<?php echo $row['Price']; ?>" />
</td>
</tr>
<?php endforeach; ?>
</table>
</form>
<form action='book.php' method='get'>
Enter Email:<input type='text' name='name'>
</form>
<script>
function summary() {
var total = 0.0;
var table = document.getElementById('items-table');
var rows = table.getElementsByTagName('tr');
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
var rowNumber = row.getAttribute('data-rownumber');
var isChecked = document.getElementById('row-' + rowNumber).checked;
if (isChecked) {
var price = parseFloat(document.getElementById('price-' + rowNumber).value);
total += price;
}
}
alert("Price of seats = " + total);
return total;
}
</script>
<input type="button" onclick="summary()" value="check">

Validating dynamically created radio button groups by page

I have a multi-page form for customizing some sort of product. The radio buttons are dynamically generated based on the values from the database. What I want to happen is prevent the form from shifting to the next page if the required radio button groups doesn't have a selected value. I have tried JQuery validation plugin:
$('#customize-form').validate({ // initialize plugin
ignore:":not(:visible)",
rules: {
shape: { required:true },
size: { required:true },
tier: { required:true },
flavors: { required:true },
}
});
Now this part here shows the next page. Works perfectly except the fact that valid() seems to always return true and it goes to the next page.
// Next button click action
btnnext.click(function(){
if(current < widget.length){
// Check validation
if($("#customize-form").valid())
{
widget.show();
widget.not(':eq('+(current++)+')').hide();
}
}
hideButtons(current); //hides buttons which are not needed such as the submit button if it's not the end of the form
})
Here is how I generate the radio buttons dynamically:
<div id=step1 class='options step'>
<section class=section-title>Shape</section>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT * FROM product_shape_t");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
echo '<ul class="radios">';
echo '<li>';
echo '<input type="radio" name="shape" id="'.$row['ShapeName'].'">';
echo '<label for="'.$row['ShapeName'].'">'.$row['ShapeName'].'</label>';
echo '</li>';
echo '</ul>';
}
?>
</div>
Here is the full html:
<html>
<head>
</head>
<body>
<form method=POST id=customize-form action ="">
<div id=step1 class='options step'>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT MAX(CustomizedProductID) as 'Max ID' FROM customized_products_t");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
$custom_id = $row['Max ID'] + 1;
echo "<label class=custom_id style='display:none'>".$custom_id."</label>";
}
?>
<section class=section-title>Shape</section>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT * FROM product_shape_t");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
echo '<ul class="radios">';
echo '<li>';
echo '<input type="radio" name="shape" id="'.$row['ShapeName'].'">';
echo '<label for="'.$row['ShapeName'].'">'.$row['ShapeName'].'</label>';
echo '</li>';
echo '</ul>';
}
?>
<section class=section-title>Size</section>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT * FROM product_size_t");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
echo '<ul class="radios">';
echo '<li>';
echo '<input type="radio" name="size" id="'.$row['SizeName'].'">';
echo '<label for="'.$row['SizeName'].'">'.$row['SizeName'].'</label><br />';
echo '<label for="'.$row['SizeDesc'].'">'.$row['SizeDesc'].'</label>';
echo '</li>';
echo '</ul>';
}
?>
<section class=section-title>Tier</section>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT * FROM product_tier_t");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
echo '<ul class="radios">';
echo '<li>';
echo '<input type="radio" name="tier" id="'.$row['TierName'].'">';
echo '<label for="'.$row['TierName'].'">'.$row['TierName'].'</label><br />';
echo '</li>';
echo '</ul>';
}
?>
</div>
<div id=step2 class='options step'>
<section class=section-title>Flavor</section>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT * FROM product_flavor_t");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
echo '<ul class="radios">';
echo '<li>';
echo '<input type="checkbox" name="flavors" id="'.$row['FlavorName'].'">';
echo '<label for="'.$row['FlavorName'].'">'.$row['FlavorName'].'</label><br />';
echo '</li>';
echo '</ul>';
}
?>
<section class=section-title>Sides (Optional)</section>
<?php
include('connect_db.php');
$query = $dbc->prepare("SELECT g.IngredientID, g.IngredientsName FROM ingredients_t g JOIN inventory_t i ON g.IngredientID = i.IngredientsID JOIN ingredient_type_t t ON t.IngTypeID = i.IngredientTypeID WHERE t.IngTypeName='sides'");
$query->execute();
$result = $query->get_result();
$total = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result, MYSQL_ASSOC)){
echo '<ul class="radios">';
echo '<li>';
echo '<input type="checkbox" name="ingredients" id="'.$row['IngredientsName'].'">';
echo '<label for="'.$row['IngredientsName'].'">'.$row['IngredientsName'].'</label><br />';
echo '</li>';
echo '</ul>';
}
?>
<section class=section-title>Template (Optional)</section>
<?php include('get_templates.php');?>
</div>
<div id=step3 class='options step'>
<section class=section-title>Image (Optional)</section>
<div class=image-display><img src="" width="100" style="display:none;" /></div>
<?php
echo '<form method=post enctype=multipart/form-data>
<section style="margin-bottom:10px">
<label class="paragraph-font2 full-width">Attach an image:</label>
</section>
<section style="margin-bottom:15px">
<input class="paragraph-font2 full-width" type=file name=uploaded_img id=uploaded_img accept="image/*">
</form>';
?>
</div>
<div id=step4 class='options step'>
<section class=section-title>Writings (Optional)</section>
<?php
echo '<form method=post>
<section class=add-notes>
<textarea id=writings class="lightfields-base lighttxtarea-regular" maxlength="250" placeholder="Do we have to write something on the cake?"></textarea>
</section>
</form>';
?>
<div class=separator-div></div>
<section class=section-title>Additional notes (Optional)</section>
<?php
echo '<form method=post>
<section class=add-notes>
<textarea id=additional class="lightfields-base lighttxtarea-medium" maxlength="999"></textarea>
</section>
</form>';
?>
</div>
<div id=step5 class='options step'>
<section class=section-title>Check your cake</section>
<div id=final_image class=final-image-display><img src="" width="100" style="display:none;" /></div>
<div class=details>
<label><span class=desc>Shape: </span><span id=shape></span></label>
<label><span class=desc>Size: </span><span id=size></span></label>
<label><span class=desc>Flavor: </span><span id=flavor></span></label>
<label><span class=desc>Sides/Mix-ins: </span><span id=sides></span></label>
<label><span class=desc>Writings: </span><span id=write></span></label>
<label><span class=desc>Additional notes: </span><span id=add_notes></span></label>
</div>
</div>
<div class=button-separator>
<label>
<button class='btn btn-info action next'>Next <span class='glyphicon glyphicon-arrow-right'></span></button>
</label>
<label>
<button class='btn btn-info action submit'>Add to cart <span class='glyphicon glyphicon-arrow-right'></span></button>
</label>
<label>
<button class='btn btn-info action back'><span class='glyphicon glyphicon-arrow-left'></span> Back</button>
</label>
</div>
</form>
</body>
</html>
<script>
$(document).ready(function(){
var current = 1;
widget = $(".step");
btnnext = $(".next");
btnback = $(".back");
btnsubmit = $(".submit");
// Init buttons and UI
widget.not(':eq(0)').hide();
hideButtons(current);
$('#customize-form').validate({ // initialize plugin
ignore:":not(:visible)",
rules: {
shape: { required:true },
size: { required:true },
tier: { required:true },
flavors: { required:true },
}
});
// Next button click action
btnnext.click(function(){
if(current < widget.length){
// Check validation
if($("#customize-form").valid())
{
widget.show();
widget.not(':eq('+(current++)+')').hide();
$('#step'+(current-1)).removeClass('active');
$('#step'+(current-1)).addClass('complete');
$('#step'+current).removeClass('disabled');
$('#step'+current).addClass('active');
//This part gets the values chosen to be displayed on page 5
/*if(current == 5)
{
var shape = $('input[type=radio][name=shape]:checked').attr('id');
var size = $('input[type=radio][name=size]:checked').attr('id');
var tier = $('input[type=radio][name=tier]:checked').attr('id');
var flavors = [];
$("input[name=flavors]:checked").each(function()
{
flavors.push($(this).attr('id'));
});
var sides = [];
$("input[name=ingredients]:checked").each(function()
{
sides.push($(this).attr('id'));
});
var writings = $(this).find('#writings').val();
var additional = $(this).find('#additional').val();
document.getElementById("shape").innerHTML=shape;
document.getElementById("size").innerHTML=size;
var flav;
for (var i=0; i<flavors.length; i++) {
flav += flavors[i];
}
document.getElementById("flavor").innerHTML=flavors;
document.getElementById("sides").innerHTML=sides;
document.getElementById("write").innerHTML=writings;
document.getElementById("add_notes").innerHTML=additional;
}*/
}
}
hideButtons(current);
})
// Back button click action
btnback.click(function(){
if(current > 1){
current = current - 2;
if(current < widget.length){
widget.show();
widget.not(':eq('+(current++)+')').hide();
//This part adjusts the steps bar
/*$('#step'+current).removeClass('complete');
$('#step'+current).addClass('active');
$('#step'+(current+1)).removeClass('active');
$('#step'+(current+1)).addClass('disabled');*/
}
}
hideButtons(current);
})
btnsubmit.click(function(){
if($("#customize-form").valid())
{
var id = $(this).find('.custom_id').text();
var quantity = 1;
window.location.href = "add_custom_to_cart.php?id=" + id + "&quantity=" + quantity;
return false;
}
})
$('#uploaded_img').change( function(event) {
$(".image-display img").fadeIn("fast").attr('src',URL.createObjectURL(event.target.files[0]));
var image_name = $(this).attr('src',URL.createObjectURL(event.target.files[0]));
document.getElementById('final_image').src = image_name;
});
$('.select-template').on('click', function(e){
var temp_id = $('.temp_id').text();
$.ajax({
type: 'POST',
url: 'add_selected_temp.php',
data: {
template: temp_id
}
});
});
$().maxlength();
});
// Hide buttons according to the current step
hideButtons = function(current){
var limit = parseInt(widget.length);
$(".action").hide();
if(current < limit) btnnext.show();
if(current > 1) btnback.show();
if (current == limit) {
btnnext.hide();
btnsubmit.show();
}
}
</script>
Am I doing something wrong or should I use an alternative solution? Thank you.
I have solved the problem by making a custom validation. There seems to be a problem with my markup that's why JQuery validation plugin won't apply. Here is my custom validation.
btnnext.click(function(){
if(current < widget.length){
// Check validation
var empty = true;
if(current == 1)
{
if($("input[name='shape']:checked").val() &&
$("input[name='tier']:checked").val() &&
$("input[name='tier']:checked").val())
{
empty = false;
}
}
if(current == 2)
{
if($("input[name='flavors']:checked").val())
{
empty = false;
}
}
if(current == 3)
{
if(document.getElementById("uploaded_img").files.length != 0)
{
empty = false;
}
}
if(current == 4)
{
if($("#writings").val())
{
empty = false;
}
}
if(current == 5)
{
empty = false;
}
if(!empty)
{
widget.show();
widget.not(':eq('+(current++)+')').hide();
//only gets values to be display on page 5 please ignore
/*if(current == 5)
{
var shape = $('input[type=radio][name=shape]:checked').attr('id');
var size = $('input[type=radio][name=size]:checked').attr('id');
var tier = $('input[type=radio][name=tier]:checked').attr('id');
var flavors = [];
$("input[name=flavors]:checked").each(function()
{
flavors.push($(this).attr('id'));
});
var sides = [];
$("input[name=ingredients]:checked").each(function()
{
sides.push($(this).attr('id'));
});
var writings = $("#writings").val()
var additional =$("#additional").val();
document.getElementById("shape").innerHTML=shape;
document.getElementById("size").innerHTML=size;
var flav;
for (var i=0; i<flavors.length; i++) {
flav += flavors[i];
}
document.getElementById("flavor").innerHTML=flavors;
document.getElementById("sides").innerHTML=sides;
document.getElementById("write").innerHTML=writings;
document.getElementById("add_notes").innerHTML=additional;
}*/
}
}
hideButtons(current);
})
I want to give credit to OffirPe'er for all the help and heads up about possible markup conflict.

Ajax does not take all params

I have a litte problem with the update. I have a couple of forms (over a loop). The script works fine with the first form, but with the others there is a problem.
while ($zeile = mysqli_fetch_array( $result, MYSQL_ASSOC))
{
....
$_SESSION['date'][$a] = $zeile['submit_time'];
$_SESSION['bes'][$a] = $zeile['date'];
<form id="upload" method="post" name="form">
<td>
<input onclick="this.value='';" class="datepicker" type="text" name="date" value="<?php echo $date_bes; ?>"/ readonly></td>
<script>
$(function() {
$( ".datepicker" ).datepicker();
});
</script>
<td style='text-align:center;width:120px;'>
<input id="chk<?php echo $a; ?>" class="chk" name="chk" type="checkbox" value=""
<?php if($check == 1){ echo "checked"; }else{ echo "";} ?>/>
<input type="hidden" class="id" value="<?php echo $id_submit; ?>">
</td>
<td style="text-align:center;width:240px;">
<textarea id="remark<?php echo $a; ?>" class="remark" name="remark" cols="30" rows="1" ><?php echo $remark; ?></textarea>
</td>
<td>
<input class="submit" type="image" src="save.jpg"></td>
</form>
...
}
my ajax_script.js
$(document).ready(function() {
$( "#upload" ).on("submit", function(e) {
e.preventDefault();
var id = $('.id').val();
var date = $('.datepicker').val();
var chk = $('.chk').prop('checked');
var remark = $('.remark').val();
$.ajax({
type: 'POST',
url: 'update.php',
data: {id: id, date: date, chk: chk, remark: remark},
success: function (data) {
if(data.success == true)
{
console.log('everything fine');
}
},
error: function(){
console.log('something bad happened');
}
});
alert('Job done');
});
});
and the update.php
<?php
$id = $_POST['id'];
$date = $_POST['date'];
$chk = $_POST['chk'];
$cancel_bool = ((int)$chk) ? 1 : 0;
$remark = $_POST['remark'];
$year = substr($date,6,4);
$mon = substr($date,3,2);
$day = substr($date,0,2);
$date = $year.'-'.$mon.'-'.$day;
if($chk == "true"){
$chk = 1;
}else{
$chk = 0;
}
echo "<br>";
echo $id ."<br>".$date."<br>".$chk."<br>".$remark;
require_once('config.php');
$link = mysqli_connect (
MYSQL_HOST,
MYSQL_USER,
MYSQL_PASSWORD,
MYSQL_DATABASE
);
if(!$link){
die('connection failed: ' .mysql_error());
}
$sql = "UPDATE table1
SET date = '$date', cancel_bool ='$chk', remark = '$remark' WHERE id_submits = $id";
$result = mysqli_query( $link, $sql );
?>
With the first form it posts the following param by clicking on save.jpg:
chk true
date 16.04.2014
id 1396002713.9412
remark mytext_one
second form:
chk
date 08.04.2014
remark mytext_two
Where is the id?
Any help or idea?
Greets Yab86

Categories

Resources