PHP - Make The Fields In A Form Table Editable
Hello All, Have another problem want to make the fields editable, i have tried in several ways but it's not helping if some one can help me out on this, i have tried contents editable = "true" but not helpful at all below is the code: Please advise what and where needs to be added to make the fields editable except date fields. <?php session_start(); error_reporting(0); include('includes/dbconnection.php'); if (strlen($_SESSION['cvmsaid']==0)) { header('location:logout.php'); } else{ if(isset($_POST['submit'])) { $eid=$_GET['editid']; $remark=$_POST['remark']; $fullname=$_POST['fullname']; $query=mysqli_query($con,"update tblsupvisitor set remark='$remark',fullname-'$fullname' where ID='$eid'"); if ($query) { $msg="Visitors Remark has been Updated."; } else { $msg="Something Went Wrong. Please try again"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags--> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="au theme template"> <meta name="author" content="Hau Nguyen"> <meta name="keywords" content="au theme template"> <!-- Title Page--> <title>CVSM Visitors Forms</title> <!-- Fontfaces CSS--> <link href="css/font-face.css" rel="stylesheet" media="all"> <link href="vendor/font-awesome-5/css/fontawesome-all.min.css" rel="stylesheet" media="all"> <link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all"> <link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all"> <!-- Bootstrap CSS--> <link href="vendor/bootstrap-4.1/bootstrap.min.css" rel="stylesheet" media="all"> <!-- Vendor CSS--> <link href="vendor/animsition/animsition.min.css" rel="stylesheet" media="all"> <link href="vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet" media="all"> <link href="vendor/wow/animate.css" rel="stylesheet" media="all"> <link href="vendor/css-hamburgers/hamburgers.min.css" rel="stylesheet" media="all"> <link href="vendor/slick/slick.css" rel="stylesheet" media="all"> <link href="vendor/select2/select2.min.css" rel="stylesheet" media="all"> <link href="vendor/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" media="all"> <!-- Main CSS--> <link href="css/theme.css" rel="stylesheet" media="all"> </head> <body class="animsition"> <div class="page-wrapper"> <!-- HEADER MOBILE--> <?php include_once('includes/sidebar-Supp.php');?> <!-- END HEADER MOBILE--> <!-- MENU SIDEBAR--> <!-- END MENU SIDEBAR--> <!-- PAGE CONTAINER--> <div class="page-container"> <!-- HEADER DESKTOP--> <?php include_once('includes/header-supp.php');?> <!-- HEADER DESKTOP--> <!-- MAIN CONTENT--> <div class="main-content"> <div class="section__content section__content--p30"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-header"> <strong>Visitor</strong> Details </div> <div class="card-body card-block"> <p style="font-size:16px; color:red" align="center"> <?php if($msg){ echo $msg; } ?> </p> <?php $eid=$_GET['editid']; $ret=mysqli_query($con,"select * from tblsupvisitor where ID='$eid'"); $cnt=1; while ($row=mysqli_fetch_array($ret)) { ?><table border="1" class="table table-bordered mg-b-0"> <tr> <th>Full Name</th> <td><?php echo $row['FullName'];?></td> </tr> <tr> <th>Qatar ID #</th> <td><?php echo $row['IDNO'];?></td> </tr> <tr> <th>Vehicle #</th> <td><?php echo $row['vno'];?></td> </tr> <tr> <th>No of Persons</th> <td><?php echo $row['noopaxs'];?></td> </tr> <tr> <th>Address</th> <td><?php echo $row['Address'];?></td> </tr> <tr> <th>Whom to Meet</th> <td><?php echo $row['WhomtoMeet'];?></td> </tr> <tr> <th>Deptartment</th> <td><?php echo $row['Deptartment'];?></td> </tr> <tr> <th>Reason to Meet</th> <td><?php echo $row['ReasontoMeet'];?></td> </tr> <tr> <th>Vistor Entring Time</th> <td><?php echo $row['EnterDate'];?></td> </tr> <?php if($row['remark']==""){ ?> <form method="post"> <tr> <th>Outing Remark :</th> <td> <textarea name="remark" placeholder="" rows="12" cols="14" class="form-control wd-450" required="true"></textarea></td> </tr> <tr align="center"> <td colspan="2"><button type="submit" name="submit" class="btn btn-primary btn-sm">Update</button></td> </tr> </form> <?php } else { ?> <tr> <th>Outing Remark </th> <td><?php echo $row['remark']; ?></td> </tr> <tr> <th>Out Time</th> <td><?php echo $row['outtime']; ?> </td> <?php } ?> </tr> </table> </div> </div> </div> </div> <?php include_once('includes/footer.php');?> </div> </div> </div> </div> <!-- Jquery JS--> <script src="vendor/jquery-3.2.1.min.js"></script> <!-- Bootstrap JS--> <script src="vendor/bootstrap-4.1/popper.min.js"></script> <script src="vendor/bootstrap-4.1/bootstrap.min.js"></script> <!-- Vendor JS --> <script src="vendor/slick/slick.min.js"> </script> <script src="vendor/wow/wow.min.js"></script> <script src="vendor/animsition/animsition.min.js"></script> <script src="vendor/bootstrap-progressbar/bootstrap-progressbar.min.js"> </script> <script src="vendor/counter-up/jquery.waypoints.min.js"></script> <script src="vendor/counter-up/jquery.counterup.min.js"> </script> <script src="vendor/circle-progress/circle-progress.min.js"></script> <script src="vendor/perfect-scrollbar/perfect-scrollbar.js"></script> <script src="vendor/chartjs/Chart.bundle.min.js"></script> <script src="vendor/select2/select2.min.js"> </script> <!-- Main JS--> <script src="js/main.js"></script> </body> </html> <!-- end document--> <?php } ?> <?php } ?>
Any help will be much appreciated.
Kind Regards, Naveed. Edited July 30, 2020 by Naveed786Similar TutorialsI have an upload form (which can be seen he http://kmkwebdevelopment.com/formtest/upload.php). There are currently 5 "upload" fields, and I would like to have it so that if a person requires more "upload" fields, they can click on a + sign or something and it will make 15 more "upload" fields drop down (so they can upload a total of 20 files at a time). Does anyone know a good way to do this? Thanks. <?php error_reporting(0); foreach($_POST as $key => $value){ if (is_array($value)) { $_values[$key] = join("%,% ",$value); }else $_values[$key] = $value; $_values[$key]=stripslashes($_values[$key]); } if (!isset($_POST["_referer"])) { @$_referer = $_SERVER["HTTP_REFERER"]; }else $_referer = $_POST["_referer"]; $_ErrorList = array(); function mark_if_error($_field_name, $_old_style = ""){ global $_ErrorList; $flag=false; foreach($_ErrorList as $_error_item_name){ if ($_error_item_name==$_field_name) { $flag=true; } } echo $flag ? "style=\"background-color: #FFCCBA; border: solid 1px #D63301;\"" : $_old_style; } function IsThereErrors($form, $_isdisplay) { global $_POST, $_FILES, $_values, $_ErrorList; $flag = false; if ($form > -1) { if ($_isdisplay) { echo "<div style=\"border: 1px solid; margin: 10px auto; padding:15px 10px 15px 50px; background-repeat: no-repeat; background-position: 10px center; color: #D63301; background-color: #FFCCBA; max-width:600px; background-image:url('".$_SERVER["PHP_SELF"]."?image=warning');\">"; } $flag = false; $req[0][] = array("firstname", "firstname is required."); $req[0][] = array("lastname", "lastname is required."); $req[0][] = array("email", "email is required."); $req[0][] = array("companynumber", "companynumber is required."); foreach($req[$form] as $field){ if (!isset($_values[$field[0]]) or ($_values[$field[0]]=="")) { $flag = true; if ($_isdisplay) { echo $field[1]."<br>"; $_ErrorList[] = $field[0]; } } } $files_req[0][] = array("upload1", "upload1 is required."); foreach($files_req[$form] as $field){ if (@$_FILES[$field[0]]["name"]=="") { $flag = true; if ($_isdisplay) { echo $field[1]."<br>"; $_ErrorList[] = $field[0]; } } } $fields[0][] = array("email", '/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]{2,4}$/', true, "email should be valid e-mail address."); $fields[0][] = array("companynumber", '/^[-+]?\b[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?\b$/', true, "companynumber should contain integer or floating point value only."); foreach($fields[$form] as $field){ if (!(preg_match($field[1],$_values[$field[0]])==$field[2]) && $_values[$field[0]]!=""){ $flag = true; if ($_isdisplay) { echo $field[3]."<br>"; $_ErrorList[] = $field[0]; } } } $files[0][] = array("upload1", "true", "true", "You are trying to upload file with not allowed extension.", "true", ""); $files[0][] = array("upload2", "true", "true", "", "true", ""); $files[0][] = array("upload3", "true", "true", "", "true", ""); $files[0][] = array("upload4", "true", "true", "", "true", ""); $files[0][] = array("upload5", "true", "true", "", "true", ""); foreach($files[$form] as $file){ $str = $file[1]; if (eval("if($str){return true;}")) { $_values[$file[0]] = $_FILES[$file[0]]["name"]; $dirs = explode("/","attachments//"); $cur_dir ="."; foreach($dirs as $dir){ $cur_dir = $cur_dir."/".$dir; if (!@opendir($cur_dir)) { mkdir($cur_dir, 0777);}} $_values[$file[0]."_real-name"] = "attachments/".date("YmdHis")."_".$_FILES[$file[0]]["name"]."_secure"; copy($_FILES[$file[0]]["tmp_name"],$_values[$file[0]."_real-name"]); @unlink($_FILES[$file[0]]["tmp_name"]); }else{ $flag=true; if ($_isdisplay) { //$ExtFltr = $file[2]; //$FileSize = $file[4]; if (!eval("if($file[2]){return true;}")){echo $file[3];} if (!eval("if($file[4]){return true;}")){echo $file[5];} $_ErrorList[] = $file[0]; } } } if ($_isdisplay) { echo "</div>"; } } return $flag; } function display_page_upload_form($_iserrors) { global $_values, $_referer;?> <html><SCRIPT LANGUAGE = "JavaScript"> var fields = { "companynumber" : ["companynumber", /^[-+]?\b[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?\b$/, true, "Your Company Number should be entered with no spaces or hyphens."], "email" : ["email", /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]{2,4}$/, true, "Please ensure your email address is in a valid format."] }; var req = { "upload1" : ["upload1", "upload1 is required."], "companynumber" : ["companynumber", "company number is required."], "email" : ["email", "email is required."], "lastname" : ["lastname", "last name is required."], "firstname" : ["firstname", "first name is required."] }; var validate_form = true;function CheckForm(){HideAllErrors();if(!validate_form)return true;var LastErrorField=null;for(var i in fields){isError=ValidateField(fields[i][0],fields[i][1],fields[i][2],fields[i][3]);if(isError)LastErrorField=isError}for(var i in req){isError=isFilled(req[i][0],req[i][1]);if(isError)LastErrorField=isError}if(LastErrorField){LastErrorField.focus();return false}else return true}function ShowTooltip(type,field,message){var IE='\v'=='v';var container;if(!(container=document.getElementById('error_list'))){var container=(IE)?(document.createElement('<div name="error_list">')):(document.createElement('div'));container=document.createElement('div');container.setAttribute('id','error_list');document.body.appendChild(container)}if(!document.getElementById(field+'_tooltip')){var elem=(IE)?(document.createElement('<div name="myName">')):(document.createElement('div'));var elem2=(IE)?(document.createElement('<div name="myName2">')):(document.createElement('div'));div_id=field+'_tooltip';elem=document.createElement('div');elem.setAttribute('id',div_id);elem.className="fe-"+type+"-container";elem.onmouseover=function(){MoveDivToTop(this)};elem.onclick=function(){HideTooltip(this.id)};elem2=document.createElement('div');elem2.className="fe-"+type;elem2.innerHTML=message;parentField=document.getElementsByName(field);var f=0;while(parentField[f].type=='hidden')f++;with(elem.style){top=findPos(parentField[f])[0]+'px';left=findPos(parentField[f])[1]+parentField[f].offsetWidth+'px'}elem.appendChild(elem2);container.appendChild(elem)}}function ValidateField(name,rule,condition,message){fld=document.getElementsByName(name);var i=0;while(fld[i].type=='hidden')i++;if(!(((fld[i].value.match(rule)!=null)==condition)||(fld[i].value==""))){ShowTooltip('error',fld[i].name,message);return fld[i]}return null}function isFilled(name,message){fld=document.getElementsByName(name);var isFilled=false;var i=0;while(fld[i].type=='hidden')i++;var obj=fld[i];for(j=i;j<fld.length;j++){if((fld[j].type=='checkbox')||(fld[j].type=='radio')){if(fld[j].checked)isFilled=true}else{if(fld[j].value!="")isFilled=true}}if(isFilled){return null}else{ShowTooltip('error',name,message);return obj}}function FieldBlur(elemId){HideTooltip(elemId);fieldName=elemId.replace(/(\S{0,})_tooltip/,"$1");if(typeof fields[fieldName]!='undefined'){ValidateField(fields[fieldName][0],fields[fieldName][1],fields[fieldName][2],fields[fieldName][3])}if(typeof req[fieldName]!='undefined'){isFilled(req[fieldName][0],req[fieldName][1])}}function HideTooltip(elemId){var elem=document.getElementById(elemId);var parent=document.getElementById('error_list');if((elem)&&(parent))parent.removeChild(elem)}function HideAllErrors(){error_container=document.getElementById('error_list');if(error_container!=null){while(error_container.childNodes.length>0){error_container.removeChild(error_container.firstChild)}}}function MoveDivToTop(div_to_top){div_container=document.getElementById('error_list');for(i=0;i<div_container.childNodes.length;i++)div_container.childNodes[i].style.zIndex="998";div_to_top.style.zIndex="999"}function findPos(obj){var curleft=curtop=0;do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent);return[curtop,curleft]} </SCRIPT> <style type="text/css"> .form_expert_style {display: none;}.fe-info,.fe-error{font:13px arial,helvetica,verdana,sans-serif;padding:2px;position:relative;top:-7px}.fe-error{border:solid 1px #d51007;background:#fbe3e4;color:#d51007}.fe-info{border:solid 1px #0187c5;background:#eff9ff;color:#0187c5}.fe-info-container,.fe-error-container{position:absolute;padding:0;border-left:8px solid transparent;-border-left:8px solid white;filter:progid:DXImageTransform.Microsoft.Chroma(color="white")}.fe-error-container{border-top:8px solid #d00}.fe-info-container{border-top:8px solid #0187c5} </style> <form class="uploadform" action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post" enctype="multipart/form-data" onSubmit="return CheckForm(this);"> <?php IsThereErrors("0", $_iserrors); ?> <input type="hidden" name="_referer" value="<?php echo $_referer ?>"> <input type="hidden" name="_next_page" value="1"> <p class="form_expert_style"><input name="URL" type="text" value=""/></p> <table> <tr> <td>First Name *</td> <td><input type='text' size='30' name='firstname' onBlur="FieldBlur(this.name+'_tooltip')" <?php mark_if_error("firstname", "") ?> value="<?php echo isset($_values["firstname"]) ? htmlspecialchars($_values["firstname"]) : "" ?>"></td> </tr> <tr> <td>Last Name *</td> <td><input type='text' size='30' name='lastname' onBlur="FieldBlur(this.name+'_tooltip')" <?php mark_if_error("lastname", "") ?> value="<?php echo isset($_values["lastname"]) ? htmlspecialchars($_values["lastname"]) : "" ?>"></td> </tr> <tr> <td>E-mail *</td> <td><input type='text' size='30' name='email' onblur="FieldBlur(this.name+'_tooltip')" <?php mark_if_error("email", "") ?> value="<?php echo isset($_values["email"]) ? htmlspecialchars($_values["email"]) : "" ?>"></td> </tr> <tr> <td>Company Number *</td> <td><input type='text' size='30' name='companynumber' onBlur="FieldBlur(this.name+'_tooltip')" <?php mark_if_error("companynumber", "") ?> value="<?php echo isset($_values["companynumber"]) ? htmlspecialchars($_values["companynumber"]) : "" ?>"></td> </tr> <tr> <td>Upload *</td> <td><input class="image" type='file' size='30' name='upload1' onBlur="FieldBlur(this.name+'_tooltip')" <?php mark_if_error("upload1", "") ?>></td> </tr> <tr> <td>Upload</td> <td><input class="image" type='file' size='30' name='upload2'></td> </tr> <tr> <td>Upload</td> <td><input class="image" type='file' size='30' name='upload3'></td> </tr> <tr> <td>Upload</td> <td><input class="image" type='file' size='30' name='upload4'></td> </tr> <tr> <td>Upload</td> <td><input class="image" type='file' size='30' name='upload5'></td> </tr> <tr> <td> </td> <td><input type="submit" name="SubmitBtn" onClick="CheckForm1();" value="SUBMIT" /></td> </tr> </table> </form> </html> <?php } function display_thankyou() { global $_values, $_referer;?> <html> <p style="margin-top:100px; padding-bottom:300px;"><b>Thank you for your submission</b></p> </html> <?php } function display_default() { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Successful submission</title><link rel="shortcut icon" href="http://forms-expert.com/images/favicon.ico" /><style>html,body,form,fieldset{margin:0;padding:0}html,body{ height:100%}body{color:#000;background:#FFF;font-family:Tahoma,Arial,Helvetica,sans-serif;line-height:160%}body#bd{padding:0;color:#333;background-color:#FFF}body.fs4{font-size:12px}.componentheading{color:#4F4F4F;font-family:"Segoe UI","Trebuchet MS",Arial,Helvetica,sans-serif;font-weight:bold}small,.small{color:#666;font-size:92%}ul{list-style:none}ul li{padding-left:30px;background:url(../images/bullet-list.gif) no-repeat 18px 9px;line-height:180%}.componentheading{padding:0 0 15px 0;margin-bottom:0px;color:#4F4F4F;background:url(http://forms-expert.com/images/dot.gif) repeat-x bottom;font-size:250%;font-weight:bold}#ja-header{height:60px;position:relative;z-index:999;width:920px;margin:0 auto;clear:both}#ja-containerwrap,#ja-footer{width:920px;margin:0 auto;clear:both}#main-container{ min-height:100%; /*height:100%;*/ position:relative}#ja-footerwrap{clear:both;border-top:1px solid #CCC;margin-top:10px;background:url(../images/grad2.gif) repeat-x top; position:absolute; bottom:0; width:100%; height:60px}#ja-footer{padding:15px 0;position:relative}#ja-footer small{padding:4px 0 0 10px;float:left;display:block;color:#999;font-style:normal;line-height:normal}small.ja-copyright{position:absolute;right:10px}#ja-footer a{color:#666;text-decoration:none}#ja-footer a:hover,#ja-footer a:active,#ja-footer a:focus{color:#666;text-decoration:underline}#ja-footer ul{margin:4px 0 5px 10px;padding:0;float:left;background:url(http://forms-expert.com/images/vline.gif) no-repeat center right;line-height:normal}#ja-footer li{margin:0;padding:0;display:inline;background:none}#ja-footer li a{padding:0 10px;display:inline;background:url(http://forms-expert.com/images/vline.gif) no-repeat center left;font-size:92%;line-height:normal}.clearfix:after{clear:both;display:block;content:".";height:0;visibility:hidden}* html >body .clearfix{width:100%;display:block}* html .clearfix{height:1%}/* Firefox Scrollbar Hack - Do not remove *//*html{margin-bottom:1px;height:100%!important;height:auto}*/a{color:#F90}a:hover,a:active,a:focus{color:#F90}#ja-containerwrap{padding:0;padding-bottom:60px}</style></head><body id="bd" class="fs4"><div id="main-container"><br><br><br><br><br><div id="ja-containerwrap"> <div id="ja-container" class="clearfix"><div style="padding: 20px 30px 20px 30px;"><div class="ja-innerpad clearfix"><div class="componentheading">Your submission was successful. Thank you.</div><p align="right">This form was processed by <a href="http://forms-expert.com">Forms Expert</a>.<p align="right">© 2009 Forms-Expert. </div></div></div></div><div id="ja-footerwrap"><div id="ja-footer" class="clearfix"><ul><li><a href="http://forms-expert.com">Visit Forms Expert</a></li><li><a href="http://forms-expert.com/form-processing-features/">Features</a></li><li><a href="http://forms-expert.com/download/">Download Beta</a></li><li><a href="http://forms-expert.com/support/">Support</a></li><li><a href="http://forms-expert.com/contactus/">Contact page</a></li></ul><small class="ja-copyright">© 2009 <a href="http://forms-expert.com/">Forms-Expert</a></small></div></div></div></body></html> <?php } function display_spam_warning() { ?> <html> <form action="" method="post"><style> .form_expert_style {display: none;} </style> <?php IsThereErrors("1", $_iserrors); ?> <input type="hidden" name="firstname" value="<?php echo htmlspecialchars($_values['firstname'])?>"> <input type="hidden" name="lastname" value="<?php echo htmlspecialchars($_values['lastname'])?>"> <input type="hidden" name="email" value="<?php echo htmlspecialchars($_values['email'])?>"> <input type="hidden" name="companynumber" value="<?php echo htmlspecialchars($_values['companynumber'])?>"> <input type="hidden" name="upload1" value="<?php echo htmlspecialchars($_values['upload1'])?>"> <input type="hidden" name="upload1_real-name" value="<?php echo htmlspecialchars($_values['upload1_real-name'])?>"> <input type="hidden" name="upload2" value="<?php echo htmlspecialchars($_values['upload2'])?>"> <input type="hidden" name="upload2_real-name" value="<?php echo htmlspecialchars($_values['upload2_real-name'])?>"> <input type="hidden" name="upload3" value="<?php echo htmlspecialchars($_values['upload3'])?>"> <input type="hidden" name="upload3_real-name" value="<?php echo htmlspecialchars($_values['upload3_real-name'])?>"> <input type="hidden" name="upload4" value="<?php echo htmlspecialchars($_values['upload4'])?>"> <input type="hidden" name="upload4_real-name" value="<?php echo htmlspecialchars($_values['upload4_real-name'])?>"> <input type="hidden" name="upload5" value="<?php echo htmlspecialchars($_values['upload5'])?>"> <input type="hidden" name="upload5_real-name" value="<?php echo htmlspecialchars($_values['upload5_real-name'])?>"> <input type="hidden" name="_referer" value="<?php echo $_referer ?>"> <input type="hidden" name="_next_page" value="2"> <p class="form_expert_style"><input name="URL" type="text" value=""/></p> <p align="center"><b>Your submission seems to be a SPAM. Please contact web site administrator or click "Back" button to return to the form.</b></p> <p align="center"><input type="submit" name="back" value="< Back"></p></form> </html> <?php } function BuildBody($body, $html, $num){ global $zag, $un; if ($html) { $zag[$num] = "--".$un."\r\nContent-Type:text/html;\r\n"; } else { $zag[$num] = "--".$un."\r\nContent-Type:text/plain;\r\n"; }; $zag[$num] .= "Content-Transfer-Encoding: 8bit\r\n\r\n$body\r\n\r\n"; } function SendEmails (){ global $_values, $zag, $un; $un = strtoupper(uniqid(time())); $to[0] .= htmlspecialchars($_values["companynumber"]) . "@aissolutions.ca"; $from[0] .= "".str_replace("%,%", ",", $_values['email']).""; $subject[0] .= "upload_form was submitted on ".date("F j, Y")." ".date("H:i").""; $head[0] .= "MIME-Version: 1.0\r\n"; $head[0] .= "From: ".str_replace("%,%", ",", $_values['email'])."\r\n"; $head[0] .= "X-Mailer: Forms Expert at www.forms-expert.com\r\n"; $head[0] .= "Reply-To: ".str_replace("%,%", ",", $_values['email'])."\r\n"; $head[0] .= "Content-Type:multipart/mixed;"; $head[0] .= "boundary=\"".$un."\"\r\n\r\n"; $EmailBody = "<html><body> Form was filled with the following data: <br><b>firstname:</b> ".htmlspecialchars($_values["firstname"])." <br><b>lastname:</b> ".htmlspecialchars($_values["lastname"])." <br><b>email:</b> ".htmlspecialchars($_values["email"])." <br><b>companynumber:</b> ".htmlspecialchars($_values["companynumber"])." <br><b>upload1:</b> ".htmlspecialchars($_values["upload1"])." <br><b>upload2:</b> ".htmlspecialchars($_values["upload2"])." <br><b>upload3:</b> ".htmlspecialchars($_values["upload3"])." <br><b>upload4:</b> ".htmlspecialchars($_values["upload4"])." <br><b>upload5:</b> ".htmlspecialchars($_values["upload5"])." </body></html> "; BuildBody($EmailBody, True, 0); for ($i=0;$i<=0;$i++){ mail($to[$i], $subject[$i], $zag[$i], $head[$i]); } } $actions = array ("display_page_upload_form","display_thankyou"); session_start(); if(!isset($_SESSION["FormSent"])) { $_SESSION["FormSent"] = time(); $delta = -1; } else { $delta = time() - $_SESSION["FormSent"]; } if (((strlen(trim(@$_POST["URL"])) > 0) or (($delta>-1)and($delta<2)))and(!isset($_POST["back"]))){ display_spam_warning(); }else{ unset($_SESSION["FormSent"]); if (in_array($_GET["image"], array("warning"))) { header("Content-type: image/png"); echo base64_decode("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUisiGIhKKhg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M9y5y8/w9g07JM6hoYOuF9RG+f7uM8O/91cZ9CwUtJiY2LLBrVsgAAggpj+//5krakkGC3C8Y/j89AUDMOGDDYHFI9gAoK9+QQ3+ASzsBPkFGPQMVRl+/PjLoK4lx8DNyQVOFyD5X1D1YH2w9ANiA8399OABg4TwFwYlbenSP7//W4McABBALEyMHI7SMqzs3x7cYfgNLGeYQHEPTCZMQFczsgIxKMmwQOohBiCbERhmzKzvGDycdBkcXOIYOP+cY/j36T3Db6C+/6BcBso5/yBR9f8vJGr+Qdl/f/1j+HrvNoOquhrbk9vcqUBVRwECiIWZjV36x6PXDN/+fmX4D7QAhJnYIJYxMUEiiRFU2AEx039YjvnHwPRxPwMX435gOQG1ENpnAKljAOL/oMgF8YHmgNT8h2bPL08+MrAAKywuPhYzkBaAAGL59vnVqSf3GBgUBYFFOjcjAzMnE7CEA1oGrAaYWBnBIQDyNZhmRDgI0q2BOIqJAWIZsPQB0/+hoQELgb8//0NyE9Alv7//Y7h/7gnD67cMm0FGAAQQi0VQ2frbpzZOPn37Rryk6H8+7l8sDGzfmBmYQaHAxAi2HGQRjIZ3qRiRa0/UnhM4KmA0KE39/sfw6/t/hl8f/zA8fwrMrFKqS0z9/dtAygECiBFUBnx4cZvh8/tnGoyMzLJAO7mAQc8G8TuSlaT0YRlRa3dgsfwXaM0vYFQB8Z8XvIJSVwQl1UBlKgNAADHiaTwyYRhFHviPhDEAQACx4HA7I5UsZ8BiDopDAAIMAP+QrU5p/QTlAAAAAElFTkSuQmCC"); }else{ if (isset($_POST["_next_page"])) { $_next_page = $_POST["_next_page"]; }else $_next_page = 0; if (isset($_POST["back"])) { call_user_func($actions[$_next_page-2],false); }else if (IsThereErrors($_next_page-1, false)){ call_user_func($actions[$_next_page-1],true); }else { call_user_func($actions[$_next_page+0],false); if ($_next_page == count($actions)-1) { SendEmails(); session_destroy(); } } } } ?> I apologize in advance, I know pretty much nothing about PHP - don't hate me, please! But I'm working on a form mailer, and it functions, but what I don't like is it leaves all the text fields, blank or not, in my email, which makes it difficult for my client to read, so theres a long list of txt field1: another text field: blah blah: all the way down the email - and I want it gone! haha. I've researched how to do this, but basically, I have no idea how to implement it into my code and don't have time right now to up and learn PHP. My code is as follows: Code: [Select] <?php //--------------------------Set these paramaters-------------------------- // Subject of email sent to you. $subject = 'PCI Tour/Excursion Request'; // Your email address. This is where the form information will be sent. $emailadd = 'MY EMAIL HERE'; // Where to redirect after form is processed. $url = 'FORWARDING URL'; // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty. $req = '0'; // --------------------------Do not edit below this line-------------------------- $text = "Results from form:\n\n"; $space = ' '; $line = ' '; foreach ($_POST as $key => $value) { if ($req == '1') { if ($value == '') {echo "$key is empty";die;} } $j = strlen($key); if ($j >= 20) {echo "Name of form element $key cannot be longer than 20 characters";die;} $j = 20 - $j; for ($i = 1; $i <= $j; $i++) {$space .= ' ';} $value = str_replace('\n', "$line", $value); $conc = "{$key}:$space{$value}$line"; $text .= $conc; $space = ' '; } mail($emailadd, $subject, $text, 'From: '.$emailadd.''); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">'; ?> IT was a very simple copy-paste form, but I have no idea what on earth I'm doing. If anyone has any ideas I would GREATLY appriciate the help! Thanks! -Austin Hi All ,
I have a small table with 4 fields namely Day_ID, Dues, Last_Visit, Points. where Day_ID is an auto-increment field. The table would be as follows:
Day_ID -- Dues --- Last_Visit --- Points.
1 --------- 900 -------- 1/12 -------- 6
2 --------- 700 -------- 4/12 -------- 7
3 --------- 600 -------- 7/12 -------- 5
4 --------- 600 -------- 9/12 -------- 6
5 --------- 600 -------- 10/12 ------- 6
6 --------- 600 -------- 14/12 ------- 6
So this is the record of a person's visit to say a club. The last row indicates the last date of his visit to the club. His points on this date are 6. Based on this point value of 6 in the last row I want to retrieve all the previous BUT adjoining all records that have the same Points i.e. 6.
So my query should retrieve for me, based on the column value of Points of the last row (i.e. Day_ID - 6 ), as follows:
4 --------- 600 -------- 9/12 -------- 6
5 --------- 600 -------- 10/12 ------- 6
6 --------- 600 -------- 14/12 ------- 6
This problem stated above had been completely resolved, thanks to a lot of help from Guru Barand by this following query :-
$query = "SELECT cv.day_id, cv.dues, cv.last_visit, cv.points FROM clubvisit cv WHERE last_visit >= ( SELECT MAX(last_visit) FROM clubvisit WHERE points <> ( SELECT points as lastpoints FROM clubvisit JOIN ( SELECT MAX(last_visit) as last_visit FROM clubvisit ) as latest USING (last_visit) ) )";I am using this and it works perfectly except that now there is a slight change in the table because the criteria for points is now dependent on more than one column cv.points and is more like cv.points1, cv.points2, cv.points3 etc. So now I need to make a selection based on each of these cv.points columns. As of now I can still get the results by running the query multiple times for each of the cv.points columns ( seperately for cv.points1, cv.points2, cv.points3) and it works correctly. However I am wondering if there is a better way to do this in just one go. This not only makes the code repetitive but also since the queries are interconnected, involves the use of transactions which I wish to avoid if possible. The values that I require for each of the cv.point columns is 1. day_id of the previous / old day on which the cv.points value changed from the current day value, and 2. cv.points on that old/ previous day. So for example if the table is as below: Day_ID -- Dues --- Last_Visit --- Points1 --- Points2. 1 --------- 900 -------- 1/12 ----------- 9 ------------ 5 2 --------- 600 -------- 4/12 ----------- 6 ------------ 6 3 --------- 400 -------- 7/12 ----------- 4 ------------ 7 4 --------- 500 -------- 9/12 ----------- 5 ------------ 8 5 --------- 600 -------- 10/12 ---------- 6 ------------ 8 6 --------- 600 -------- 11/12 ---------- 6 ------------ 8 7 --------- 600 -------- 13/12 ---------- 6 ------------ 7 8 --------- 500 -------- 15/12 ---------- 5 ------------ 7 9 --------- 500 -------- 19/12 ---------- 5 ------------ 7 Then I need the following set of values : 1. day_id1 -- Day 7, points1 ---- 6, days_diff1 -- (9-7 = 2) . // Difference between the latest day and day_id1 2. day_id2 -- Day 6, points2 ---- 8, days_diff2 -- (9-6 = 3) 3. day_id3 -- .... and so on for other points. Thanks all ! Hi- the code below lets me upload a CSV file to my database if I have 1 field in my database and 1 column in my CSV. I need to add to my db "player_id" from the CVS file and "event_name" and "event_type" from the form... any ideas??? here's the code: Code: [Select] <?php $hoststring =""; $database = ""; $username = ""; $password = ""; $makeconnection = mysql_pconnect($hoststring, $username, $password); ?> <?php ob_start(); mysql_select_db($database, $makeconnection); $sql_get_players=" SELECT * FROM tabel ORDER BY player_id ASC"; // $get_players = mysql_query($sql_get_players, $makeconnection) or die(mysql_error()); $row_get_players = mysql_fetch_assoc($get_players); // $message = null; $allowed_extensions = array('csv'); $upload_path = '.'; //same directory if (!empty($_FILES['file'])) { if ($_FILES['file']['error'] == 0) { // check extension $file = explode(".", $_FILES['file']['name']); $extension = array_pop($file); if (in_array($extension, $allowed_extensions)) { if (move_uploaded_file($_FILES['file']['tmp_name'], $upload_path.'/'.$_FILES['file']['name'])) { if (($handle = fopen($upload_path.'/'.$_FILES['file']['name'], "r")) !== false) { $keys = array(); $out = array(); $insert = array(); $line = 1; while (($row = fgetcsv($handle, 0, ',', '"')) !== FALSE) { foreach($row as $key => $value) { if ($line === 1) { $keys[$key] = $value; } else { $out[$line][$key] = $value; } } $line++; } fclose($handle); if (!empty($keys) && !empty($out)) { $db = new PDO( 'mysql:host=host;dbname=db', 'user', 'pw'); $db->exec("SET CHARACTER SET utf8"); foreach($out as $key => $value) { $sql = "INSERT INTO `table` (`"; $sql .= implode("`player_id`", $keys); $sql .= "`) VALUES ("; $sql .= implode(", ", array_fill(0, count($keys), "?")); $sql .= ")"; $statement = $db->prepare($sql); $statement->execute($value); } $message = '<span>File has been uploaded successfully</span>'; } } } } else { $message = '<span>Only .csv file format is allowed</span>'; } } else { $message = '<span>There was a problem with your file</span>'; } } ob_flush();?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>CSV File Upload</title> </head> <body> <form class="form" action="" method="post" enctype="multipart/form-data"> <h3>Select Your File</h3> <p><?php echo $message; ?></p> <input type="file" name="file" id="file" size="30" /> <br/> <label>Event Name:</label><input name="event_name" type="text" value="" /> <br/> <label>Event Type:</label><input name="event_type" type="text" value="" /> <br/> <input type="submit" id="btn" class="button" value="Submit" /> </form> <br/> <h3>Results:</h3> <?php do { ?> <p><?php echo $row_get_players['player_id'];?></p> <?php } while ($row_get_players = mysql_fetch_assoc($get_players)); ?> </body> </html> Can someone please tell me how to use the "SHOW FIELDS FROM $mytable" in php? I understand how the MySql works but need to get these fields back into an array in php. That is the part I am strruggling with.. I normally return rows of data from my table and use a while loop.
Hi there, wanted to see how I would have the columns I specified in $fields = array('id','type');
then be generated dynamically in the while loop and any other field I state in $fields = array('id','type');
then its added to the while loop in the below include('db.php'); class SelectData{ public function wpquery_select($conn,$sql,$fields){ $results = $conn->query($sql); if($results->num_rows > 0){ while($row = $results->fetch_assoc()){ // How would you process the array $fields which holds all the rows specified and dynamically create echo $row['id'], $row['id'] and so on? } } $conn->close(); } } $select = new SelectData(); $sql = "SELECT * FROM orders"; $fields = array('id','type'); $select->wpquery_select($conn,$sql,$fields); Thank you Hi all, So I'm not completely sure on how to do this, but basically this i what i want. I want the users to be able to create "fields" in my table, so let's say we have a structure like this: Field 1 Field 2 Field 3 Data 1 Data 2 Data 3 Problem is, that i want my users to update both the <td> and <tr> information via mysql, without altering the database. And I'm not sure on how I can make sure, that everything gets out in the right order. I have this so far: Code: [Select] <table id="sort-table"> <thead> <tr> <?PHP echo ' <td> Identifier </td> '; $result = mysql_query("SELECT * FROM fields ORDER BY `order`"); while($row = mysql_fetch_array($result)) { echo ' <td> ' . $row["name"] . ' </td> '; } ?> <th style="width:128px">Options</th> </tr> </thead> This will display the field 1, 2, 3 etc.. My problem is.. How do i get the content displayed in the right order to the right fields.. :/ I hope you understand me, if not, please tell me so I can elaborate ^_^ I know this might seems like a noob question, and I'm sorry that I couldn't search, but I didn't know what to search for. I have the following html code and php code. I would like clients to select which fields in the mysql database they would like to have appear in the resultant table by checking the text box next to the field in the html form. For instance they should be able to select first name and city and have only those columns appear in the resultant table. # <html> # <head> # <title>Search Clients Database</title> # </head> # # <body> # <h1>Clients Database Search Page</h1> # <form action="searchclients.php" method="post"> # <table width="100%" border="1" cellspacing="1" cellpadding="1"> # <tr> # <th width="37" scope="col"> </th> # <th width="114" scope="col">Fields</th> # <th width="169" scope="col">Filter Value</th> # <th width="1157" scope="col"> </th> # </tr> # <tr> # <td><input type="checkbox" name="idc" id="idc"></td> # <td>ID</td> # <td><input type="text" name="ID" id="ID"></td> # <td> </td> # </tr> # <tr> # <td><label> # <input type="checkbox" name="fnc" id="fnc"> # </label></td> # <td>First Name</td> # <td><input type="text" name="FirstName" id="FirstName"></td> # <td> </td> # </tr> # <tr> # <td><label> # <input type="checkbox" name="lnc" id="lnc"> # </label></td> # <td>Last Name</td> # <td><input type="text" name="LastName" id="LastName"></td> # <td> </td> # </tr> # <tr> # <td><label> # <input type="checkbox" name="cc" id="cc"> # </label></td> # <td>City</td> # <td><input type="text" name="City" id="City"></td> # <td> </td> # </tr> # <tr> # <td><label> # <input type="checkbox" name="pc" id="pc"> # </label></td> # <td>Province</td> # <td><select name="Province" id="Province"> # <option selected> </option> # <option>KZN</option> # <option>North West Province</option> # <option>Gauteng</option> # <option>Free State</option> # <option>Mpumalanga</option> # <option>Eastern Cape</option> # <option>Limpopo Province</option> # <option>Northern Cape</option> # <option>Western Cape</option> # </select></td> # <td> </td> # </tr> # </table> # <p> # <input type="submit" name="submit" value="Search" /> # </p> # </form> # # </body> # </html> # <?php # mysql_connect ("localhost", "username","password") or die (mysql_error()); # mysql_select_db ("clients"); # # $fn = $_POST['FirstName']; # $ln = $_POST['LastName']; # $city = $_POST['City']; # $prov = $_POST['Province']; # # $idc = $_POST['idc']; # $fnc = $_POST['fnc']; # $lnc = $_POST['lnc']; # $cc = $_POST['cc']; # $pc = $_POST['pc']; # # ?> # # <html> # <body> # # <table border=1> # <tr> # <th>ID</th> # <th>First Name</th> # <th>Last Name</th> # <th>City</th> # <th>Province</th> # </tr> # # <?php # $sql = mysql_query("select ID, FirstName, LastName, City, Province from clients where FirstName like '%$fn%' and LastName like '%$ln%' and City like '%$city%' and Province like '%$prov%'"); # # while ($row = mysql_fetch_array($sql)){ # # $id = $row['ID']; # $fname = $row['FirstName']; # $lname = $row['LastName']; # $city = $row['City']; # $prov = $row['Province']; # # ?> # # <tr> # <th><?php echo $id;?></th> # <th><?php echo $fname;?></th> # <th><?php echo $lname;?></th> # <th><?php echo $city;?></th> # <th><?php echo $prov;?></th> # </tr> # # <?php } //this ends the if?> # # </table> # </html> Hi and thank you in advance for helping me. Here is the code fragment: $sql="SELECT UserID,UserName FROM `UserValidation` WHERE UserID='".$_SESSION["UserID"]."'"; $rs=CustomQuery($sql); $RecData=db_fetch_array($rs); global $conn,$strUserValidation; $strSQLSave = "INSERT INTO RecruiterNames (UserID, UserName) values ("; $strSQLSave .= $RecData["UserID"].","; $strSQLSave .= chr(34).$RecData['UserName'].chr(34); $strSQLSave .= ")"; db_exec($strSQLSave,$conn); Here is the error I receive: php error happened Technical information Error type 256 Error description You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"")' at line 1 URL www.dealwithaces.com/ACESDB/register.php? Error file /home/debra/public_html/dealwithaces.com/ACESDB/include/dbconnection.php Error line 36 SQL query INSERT INTO RecruiterNames (UserID, UserName) values (,"") More info Call stack File: line Function Arguments #0. include/dbconnection.php:36 db_query 1. INSERT INTO RecruiterNames (UserID, UserName) values (,""); 2. Resource id #10; #1. include/dbconnection.php:47 db_exec 1. INSERT INTO RecruiterNames (UserID, UserName) values (,""); 2. Resource id #10; #2. include/events.php:25 AfterSuccessfulRegistration 1. Array ( [UserName] => bsbnick [Password] => kaos55 [UserEmail] => mike@world-class-multimedia.com [GroupID] => 1 [UserActive] => 0 ) ; #3. register.php:298 Global scope N/A I need two fields from UserValidation table (UserID and UserName) to be inserted into table RecruiterNames (UserID and UserName), but ONLY when GroupID = 3 Thank you again for your help. Mike I'm trying to create a table form that pulls in "Extra" choices from a table and allows users to select a number of days and number of guests for each choice. I started creating it a a checkbox field but am thinking just using the name as a label and setting days and guests to default "0" might be a better bet. Guidance from someone more experienced with this? Also, how do I store the submission (db structure - in the "reservations" table, another?). I'm new to this and feel kind of lost with this challenge. //Extras $query = "select * from extras"; $data = mysqli_query($db, $query); $num = mysqli_num_rows($data); echo "<p><b>Extras:</b></p>"; for ($i=0; $i<$num; $i++) { $row = mysqli_fetch_array($data); $extra_id = $row['extra_id']; $extra_name = $row['extra_name']; $extra_rate = $row['extra_rate']; echo "<p><input type='checkbox' name='extra_id[]' value = '$extra_id' />$extra_name <i>\$$extra_rate</i> Num Days<input type='text' name='d$extra_id' /> Num Guests<input type='text' name='g$extra_id' />"; } I want to have a search product feature, but I would like members to be able to search multiple fields in one go i.e. product_code, Product_name in one MySQL query. The thing is, members have to be logged on, so the query must also only show results relating to that specific member, via the session[member_ID], my current query for listing products for that specific member is : Code: [Select] $sql = "SELECT productId, productCode, image, name, price, stock_level FROM product_inventory WHERE memberr_ID = '" . $_SESSION['SESS_mem_ID'] . "; How would I change the above into a search query to search for productcode, productname and still only show results beloging to this member using the session data ? all help appreciated hi, i'm new to php. i've got a problem. I've 3 tables and table has following content table 1 id name email address phone execution_date executor_name web_address table 2 id name email address phone execution_date executor_name project_title table 3 id name email address phone execution_date executor_name reviewer I want to export these table to and spreadsheet (.xls) with some criteria a form will assign which data will published at the spreadsheet with these criteria #all data can be exported from three tables #some column can be selected from three tables #some or all data can be selected from individual table i've implement a script for this but it didn't meet my requirements. Can anyone help? here is my script <?php $DB_Server = "localhost"; //your MySQL Server $DB_Username = "root"; //your MySQL User Name $DB_Password = "pass"; //your MySQL Password $DB_DBName = "mydb"; //your MySQL Database Name $search_from_date = $_POST['start_date']; $search_to_date = $_POST['end_date']; $Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password) or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_errno()); $Db = @mysql_select_db($DB_DBName, $Connect) or die("Couldn't select database:<br>" . mysql_error(). "<br>" . mysql_errno()); $now_date = date('m-d-Y H:i'); if(($_POST['typer_of_report'] == 'rrc_report') || ($_POST['typer_of_report'] == 'all_report')) { $DB_TBLName = 'rrc_record'; } if(($_POST['typer_of_report'] == 'erc_report') || ($_POST['typer_of_report'] == 'all_report')) { $DB_TBLName2 = 'erc_record'; } if(($_POST['typer_of_report'] == 'aeec_report') || ($_POST['typer_of_report'] == 'all_report')) { $DB_TBLName3 = 'aeec_record'; } $file_type = "vnd.ms-excel"; $file_ending = "xls"; //} header("Content-Type: application/$file_type"); header("Content-Disposition: attachment; filename=protocol_report.$file_ending"); header("Pragma: no-cache"); header("Expires: 0"); if($DB_TBLName) { $sql = "Select * from ".$DB_TBLName." where execution_date >= '".$search_from_date."' and execution_date <= '".$search_to_date."' order by execution_date desc"; $Use_Title = 1; $title = "Report for $DB_TBLName on $now_date"; $result = @mysql_query($sql,$Connect) or die("Couldn't execute query:<br>" . mysql_error(). "<br>" . mysql_errno()); if ($Use_Title == 1) { echo("$title\n"); } $sep = "\t"; //tabbed character for ($i = 0; $i < mysql_num_fields($result); $i++) { echo mysql_field_name($result,$i) . "\t"; } print("\n"); while($row = mysql_fetch_row($result)) { $schema_insert = ""; for($j=0; $j<mysql_num_fields($result);$j++) { if(!isset($row[$j])) $schema_insert .= "NULL".$sep; elseif ($row[$j] != "") $schema_insert .= "$row[$j]".$sep; else $schema_insert .= "".$sep; } $schema_insert = str_replace($sep."$", "", $schema_insert); $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert); $schema_insert .= "\t"; print(trim($schema_insert)); print "\n"; } //} echo "\n...\n"; } if($DB_TBLName2) { $sql = "Select * from ".$DB_TBLName2." where execution_date >= '".$search_from_date."' and execution_date <= '".$search_to_date."' order by execution_date desc"; $result = @mysql_query($sql,$Connect) or die("Couldn't execute query:<br>" . mysql_error(). "<br>" . mysql_errno()); $Use_Title = 1; $title = "Report for $DB_TBLName2 on $now_date"; if ($Use_Title == 1) { echo("$title\n"); } $sep = "\t"; //tabbed character for ($i = 0; $i < mysql_num_fields($result); $i++) { echo mysql_field_name($result,$i) . "\t"; } print("\n"); while($row = mysql_fetch_row($result)) { $schema_insert = ""; for($j=0; $j<mysql_num_fields($result);$j++) { if(!isset($row[$j])) $schema_insert .= "NULL".$sep; elseif ($row[$j] != "") $schema_insert .= "$row[$j]".$sep; else $schema_insert .= "".$sep; } $schema_insert = str_replace($sep."$", "", $schema_insert); $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert); $schema_insert .= "\t"; print(trim($schema_insert)); print "\n"; } echo "\n...\n"; } if($DB_TBLName3) { $sql = "Select * from ".$DB_TBLName3." where execution_date >= '".$search_from_date."' and execution_date <= '".$search_to_date."' order by execution_date desc"; $result = @mysql_query($sql,$Connect) or die("Couldn't execute query:<br>" . mysql_error(). "<br>" . mysql_errno()); $Use_Title = 1; $title = "Report for $DB_TBLName3 on $now_date"; if ($Use_Title == 1) { echo("$title\n"); } $sep = "\t"; //tabbed character for ($i = 0; $i < mysql_num_fields($result); $i++) { echo mysql_field_name($result,$i) . "\t"; } print("\n"); while($row = mysql_fetch_row($result)) { $schema_insert = ""; for($j=0; $j<mysql_num_fields($result);$j++) { if(!isset($row[$j])) $schema_insert .= "NULL".$sep; elseif ($row[$j] != "") $schema_insert .= "$row[$j]".$sep; else $schema_insert .= "".$sep; } $schema_insert = str_replace($sep."$", "", $schema_insert); $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert); $schema_insert .= "\t"; print(trim($schema_insert)); print "\n"; } } ?> have anyone any idea? Hi Guys i need help on a small matter. if you go to https://www.mywebchambers.co.uk/invoiceman/form.php when submitted all works ok. However if you delete rows 3, 4 and 5 and submit the page shows a value of 0.00 in the total column on rows 3, 4 and 5. How do i get this value removed so it is blank same as the rest ?
My form action is toolstation3.php code below
<!doctype html> <?php
{$orderno =($_POST["orderno"]);}
{$code3 =($_POST["code3"]);}
{$code4 =($_POST["code4"]);}
{$code5 =($_POST["code5"]);}
{$sum1 =($_POST["sum1"]);} {$nil =($_POST["nil"]);}
$net=$sum1+$sum2+$sum3+$sum4+$sum5;
$total=$net+$vat;
$sum1 = number_format($sum1, 2, '.', '');
if(empty($_POST['quantity3']) && empty($_POST['price3'])) {echo " $nil";}
echo "<br>   ____________________________________________________________________________________________________<br><br>"; echo "<H3>    Address                                                                                                                     Details "; echo "<br>   ___________________________________________________________          ____________________________________<br><br>";
echo "<tr>
echo "<tr> echo "<table cellpadding=3 border=0 style='float:left'>";
echo "<tr> echo "<table cellpadding=3 border=0 style='float:left'>";
echo "<tr> echo "<table cellpadding=3 border=0>";
echo "<tr> echo "<H3>    Items"; echo "<br>   __________________________________________<br><br>";
echo "<tr><th>Code</th><th>Name</th><th>Quantity</th><th>Price</th><th>Total</th><th>Vat Band</th></tr>"; echo "<tr><td>$code1</td><td>$name1</td><td>$quantity1</td><td>$price1</td><td>$sum1</td><td>$vatband1</td> "; echo "<tr><td>$code2</td><td>$name2</td><td>$quantity2</td><td>$price2</td><td>$sum2</td><td>$vatband2</td> "; echo "<tr><td>$code3</td><td>$name3</td><td>$quantity3</td><td>$price3</td><td>$sum3</td><td>$vatband3</td> "; echo "<tr><td>$code4</td><td>$name4</td><td>$quantity4</td><td>$price4</td><td>$sum4</td><td>$vatband4</td> "; echo "<tr><td>$code5</td><td>$name5</td><td>$quantity5</td><td>$price5</td><td>$sum5</td><td>$vatband5</td> ";
echo "<br>"; echo "<H3>    VAT Analysis"; echo "<br>   __________________________________________<br><br>"; echo "<table cellpadding=5 border=1>"; echo "<tr><th>Band</th><th>Rate</th><th>Net</th><th>VAT</th><th>Total</th></tr>"; echo "<tr><td>5</td><td>20%</td><td>$net</td><td>$vat</td><td>$total</td> ";
<div id="container">
I need help with a form .. My form needs to allow an additional drop down field for Groups. This form also needs to save the extra fields chosen into my MySQL DB. Here is my form.. Code: [Select] <form action='' method='post' class='assessment'> <h1>Create User</h1> <div class='label'>First Name</div> <div class='field'><input type='text' name='firstname' value='<?=$preUser->firstname?>' /></div> <div class='cb'></div> <div class='label'>Last Name</div> <div class='field'><input type='text' name='lastname' value='<?=$preUser->lastname?>' /></div> <div class='cb'></div> <div class='label'>Password</div> <div class='field'><input type='text' name='password' value='<?=$preUser->password?>' /></div> <div class='cb'></div> <div class='label'>Company</div> <div class='field'><input type='text' name='company' value='<?=$preUser->company?>' /></div> <div class='cb'></div> <div class='label'>Job Title</div> <div class='field'><input type='text' name='job' value='<?=$preUser->job?>' /></div> <div class='cb'></div> <div class='label'>Group Name</div> <div class='field'><select name='group'><?=$groupSelect?></select></div> <div class='cb'></div> <div class='label'>Address</div> <div class='field'><input type='text' name='street1' value='<?=$preUser->street1?>' /></div> <div class='cb'></div> <div class='label'>Address (optional)</div> <div class='field'><input type='text' name='street2' value='<?=$preUser->street2?>' /></div> <div class='cb'></div> <div class='label'>City</div> <div class='field'><input type='text' name='city' value='<?=$preUser->city?>' /></div> <div class='cb'></div> <div class='label'>State</div> <div class='field'><input type='text' name='state' value='<?=$preUser->state?>' /></div> <div class='cb'></div> <div class='label'>Postal Code</div> <div class='field'><input type='text' name='postal' value='<?=$preUser->postal?>' /></div> <div class='cb'></div> <div class='label'>Country</div> <div class='field'><input type='text' name='country' value='<?=$preUser->country?>' /></div> <div class='cb'></div> <div class='label'>Fax</div> <div class='field'><input type='text' name='fax' value='<?=$preUser->fax?>' /></div> <div class='cb'></div> <div class='label'>Phone</div> <div class='field'><input type='text' name='phone1' value='<?=$preUser->phone1?>' /></div> <div class='cb'></div> <div class='label'>Phone 2</div> <div class='field'><input type='text' name='phone2' value='<?=$preUser->phone2?>' /></div> <div class='cb'></div> <div class='label'>Email</div> <div class='field'><input type='text' name='email' value='<?=$preUser->email?>' /></div> <div class='cb'></div> <div class='label'>Website</div> <div class='field'><input type='text' name='website' value='<?=$preUser->website?>' /></div> <div class='cb'></div> <div class='label'>Photo</div> <div class='field imgupload'> <input type='hidden' name='photo' /> <? if( $preUser->photo ){ ?> <img src="../<?=$preUser->photo?>" style="height:300px; float:left;" /> <span class="rmimage" style="color:red; cursor:pointer; font-size:20px;padding-left:15px;" alt="<?=$preUser->photo?>">x</span> <? }else{ ?> <iframe src="../view/photo_upload.php" frameborder="0" scrolling="no" width="300" height="30"></iframe> <? } ?> </div> <div class='cb'></div> <div class='label'>Payment Option</div> <div class='field'> <input type='radio' name='payment' value='Pay' <? if( $preUser->payment == 'Pay' ) echo "checked='checked'"; ?> />Pay<br /> <input type='radio' name='payment' value='NonPaid' <? if( $preUser->payment == 'NonPaid' ) echo "checked='checked'"; ?> />NonPaid </div> <div class='cb'></div> <div class='label'>Dashboard Options</div> <div class='field'> <div><input type='checkbox' name='mysteps' <? if( $preUser->mysteps ) echo "checked='checked'"; ?> value='1' />My Steps</div> <div><input type='checkbox' name='mycalendar' <? if( $preUser->mycalendar ) echo "checked='checked'"; ?> value='1' />My Calendar</div> <div><input type='checkbox' name='myprofiles' <? if( $preUser->myprofiles ) echo "checked='checked'"; ?> value='1' />My Profile</div> <div><input type='checkbox' name='myplans' <? if( $preUser->myplans ) echo "checked='checked'"; ?> value='1' />My Plans</div> </div> <div class='cb'></div> <div class='submit_assessment'><input type='submit' name='create_user' class='submit' value='Create User' /> <input type='button' value='Back' class='back' name='admin_create' /></div> <div class='cb'></div> </form> <script> function setUploadedImage(flink){ $('.imgupload > input:first').after('<img src="../'+flink+'" style="height:300px; float:left;" /><span class="rmimage" style="color:red; cursor:pointer; font-size:20px;padding-left:15px;" alt="'+flink+'">x</span>'); $('.imgupload > iframe:first').remove(); $('.imgupload > input:first').val(flink); } $('.rmimage').live('click', function (){ $(this).prev().prev().val(''); $(this).prev().remove(); $(this).after('<iframe src="../view/photo_upload.php" frameborder="0" scrolling="no" width="300" height="30"></iframe>'); $.post('../ajax/admin.php',{remove_image:$(this).attr("alt")}); $(this).remove(); }); </script> the specific area in question is this... Code: [Select] <div class='label'>Group Name</div> <div class='field'><select name='group'><?=$groupSelect?></select></div> I need to be able to add another dropdown list to allow for multiple group selections that get saved into the DB once submitted. How do I go about doing this?????? Although I am deciding on the best route to go on this, I was hoping for any feedback or ideas on the best and simplest approach to the below problem: Here is my table structu old_code_1 old_code_2 new_code_1 new_code_2 prod_code_1 prod_code_2 Each of the following fields has 5 digits e.g. 00045, 12654, etc. What I need to achieve is this: Concatenate each set (of the 3 sets above) data into one variable e.g. old_code_1 + old_code_2 = 0004512654. So old_code_1 & old_code_2 would become a combined data and the same for the othe 2 sets. Then. Once concatenated, I need to compa prod_code_1+prod_code_2 with old_code_1+old_code_2 and replace prod_code_1+prod_code_2 with new_code_1+new_code_2 where matches are found. The new_code_1 & 2 are in the same row as the old_code 1 & 2. So the data is in alignment that way for comparison. Thanks for any insight or suggestions on how to make this happen in the simplest form possible. Hello, i have two fields. a beginning year and an ending year. How can i make new fields out of the years in between the beginning and ending years. i hope that makes sense. Is there anything wrong (or insecure) with using hidden form fields? I am working on a page where the user can choose one of 4 different subscription options. The approach I was going to use is to have a separate form for each plan, and when the user chooses one, submit a hidden form value so my script knows which subscription plan to grab out of the database. Thoughts? Hello. So I already know an extremely elementary way to check to see if a form field is blank using PHP. For example: Code: [Select] if ($subject == "") The question I have is, is there a way to have php check every field in a form to make sure it has some sort of value? I want to create an 'if' statement which basically says, "If all form fields have something filled in, then do this" For example Code: [Select] if ($subject == "any value") & ($name == "any value") & ($comment == "any value") Not sure if that makes sense. Any help would be greatly appreciated!!! I have got another of those problems that should be easy to solve but I cannot get my head round it! I have a form to enter data into a table and one of the fields can be left blank. However, I'd data is entered in the field it can be a Zero. This is leaving me a problem as I cannot find a way to get the script to insert NULL if the field is blank but actually put the Zero in if that is what is entered. I have tried several permutations of nested if's using empty or isset, but whatever I try, the same result is inserted in both scenarios. The arguments I need to pass are...... If field is empty INSERT null If field is 0 INSERT 0 If field is not empty and not 0 INSERT field Thanks in advance for any suggestions. Steve Hello, A named field in an html form e.g. <input type="text" name="time"> is accessed as $_GET['time'] or $_POST['time'] by the processing script. What about an unnamed field like the one below: <input type="text" value="" id="1" /> How do I harvest this field's input as a variable from my php processing script? Thanks in advance |