The first thing you can learn HTML, whether you want to become a professional web developer or just want to learn more about how websites work. The basic language for developing web pages and web applications is HTML. A server ...
Asynchronous Javascript One of AJAX’s benefits is it provides instantaneous feedback to the user because it requests information asynchronously from the backend web server. However, using AJAX does not guarantee the user will not wait for the asynchronous JavaScript and ...
How To Make Cookie Free Domain An HTTP cookie (also known as a web cookie, Internet cookie, browser cookie, or simply cookie) is a small piece of data sent from a website and stored on the user’s computer by the ...
Problem to insert my zip file in the database
thanx
thanx
See lessProblem to insert my zip file in the database
<!– Hospital Records #dialogoverlay{ display: none; opacity: .8; position: fixed; top: 0px; left: 0px; background: #FFF; width: 100%; z-index: 10; } #dialogbox{ display: none; position: fixed; background: #000; border-radius:7px; width:550px; z-index: 10; } #dialogbox > div{ background:#Read more
<!–
Hospital Records
#dialogoverlay{
display: none;
opacity: .8;
position: fixed;
top: 0px;
left: 0px;
background: #FFF;
width: 100%;
z-index: 10;
}
#dialogbox{
display: none;
position: fixed;
background: #000;
border-radius:7px;
width:550px;
z-index: 10;
}
#dialogbox > div{ background:#FFF; margin:8px; }
#dialogbox > div > #dialogboxhead{ background: #ff0000; font-size:19px; padding:10px; color:#CCC; }
#dialogbox > div > #dialogboxbody{ background:#333; padding:20px; color:#FFF; }
#dialogbox > div > #dialogboxfoot{ background: #666; padding:10px; text-align:right; }
Patient Registration
<?php
if(isset($_POST['Submit'])){
$rand = rand(10,100);
$streplaceFileName = $_FILES['zipFile']['name'];
$zipFile = $rand."-".$streplaceFileName;
$ds = DIRECTORY_SEPARATOR;
$storeFolder = "uploads/";
if((!empty($_FILES)) && !empty($_FILES['zipFile']['name'])) {
if(preg_match('/[.](zip)$/', $_FILES['zipFile']['name'])) {
$filename = $rand . "-" . $streplaceFileName;
$tempFile = $_FILES['zipFile']['tmp_name'];
$targetPath = $storeFolder . $ds;
$targetFile = $targetPath.$filename;
$check = move_uploaded_file($tempFile,$targetFile);
}
}
function cleanSpecialCharacters($string) {
$string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
return preg_replace('/[^A-Za-z0-9.\-]/', '', $string); // Removes special chars.
}
}
$Reason=$_POST["reason"];
$Bpsys=$_POST["Bpsys"];
$Bpdia=$_POST["Bpdia"];
$temp=$_POST["temp"];
$pulse=$_POST["pulse"];
$resp=$_POST["resp"];
$weight=$_POST["weight"];
$height=$_POST["height"];
$symp=$_POST["symp"];
$sym=$_POST["sym"];
$diag=$_POST["diag"];
$diags=$_POST["diags"];
$pres=$_POST["pres"];
$stren=$_POST["stren"];
$direc=$_POST["direc"];
$qty=$_POST["qty"];
$treat=$_POST["treat"];
$test=$_POST["test"];
$testdet=$_POST["testdet"];
//sql insert statement-record saving in my database
$sql="INSERT INTO history (Patient_Id,Reason,Bpsys,Bpdia,Temp,Pulse,Resp,Weight,Height,Symp,Sym,Diag,Diags,Dname,Stren,Direc,Qty,Treat,Tname,Tdet,file,type) VALUES ('$_POST[Id]','$Reason','$Bpsys','$Bpdia','$temp','$pulse','$resp','$weight','$height','$symp','$sym','$diag','$diags','$pres','$stren','$direc','$qty','$treat','$test','$testdet','$filename','$tempFile')";
$result2 = mysql_query($sql) or die('Query failed: ' .mysql_error());
echo 'Thank you for ADDING ! ‘;
?>
See lessGet an error in html form while saving data in PHP
Thanx
Thanx
See lessGet an error in html form while saving data in PHP
i have a table patient in database(patienttbl),then i have a history table in database. When a doctor view his patient he has a button beside each patient where he can add patient medical history.I want that when the doctor add the history,it stores the patient id also in the history table.so as toRead more
i have a table patient in database(patienttbl),then i have a history table in database. When a doctor view his patient he has a button beside each patient where he can add patient medical history.I want that when the doctor add the history,it stores the patient id also in the history table.so as to know which table history belongs to which patient.
See lessHow to add an edit button in search results?
Thanx
Thanx
See lessHow you can upload the file from the upload button?
Thanx
Thanx
See lessHow to add an edit button in search results?
PHP MySQL & Ajax Live Data Table Tutorial PHP MySQL & Ajax Live Data Table Tutorial Type a name to begin searching Name Company Zip City Top Searches These results are ranked by popularity in the query_data table. Each time the complete name is entered in the search, a +1 is registered and iRead more
PHP MySQL & Ajax Live Data Table Tutorial
PHP MySQL & Ajax Live Data Table Tutorial
Type a name to begin searching
Name
Company
Zip
City
Top Searches
These results are ranked by popularity in the query_data table. Each time the complete name is entered in the search, a +1 is registered and incremented.
Name
Company
Zip
City
Check out the full tutorial at LekkerLogic.com – PHP MySQL Ajax Live Data Table Tutorial
search.php
<?php
require_once 'db.php';
// Output HTML formats
$html = '’;
$html .= ’nameString’;
$html .= ’compString’;
$html .= ’zipString’;
$html .= ’cityString’;
$html .= ’’;
// Get the Search
$search_string = preg_replace(”/[^A-Za-z0-9]/”, ” ”, $_POST[’query’]);
$search_string = $test_db->real_escape_string($search_string);
// Check if length is more than 1 character
if (strlen($search_string) >= 1 && $search_string !== ’ ’) {
//Insert Time Stamp
$time = ”UPDATE query_data SET timestamp=now() WHERE name=’” .$search_string. ”’”;
//Count how many times a query occurs
$query_count = ”UPDATE query_data SET querycount = querycount +1 WHERE name=’” .$search_string. ”’”;
// Query
$query = ’SELECT * FROM live_table WHERE name LIKE ”%’.$search_string.’%”’;
//Timestamp entry of search for later display
$time_entry = $test_db->query($time);
//Count how many times a query occurs
$query_count = $test_db->query($query_count);
// Do the search
$result = $test_db->query($query);
while($results = $result->fetch_array()) {
$result_array[] = $results;
}
// Check for results
if (isset($result_array)) {
foreach ($result_array as $result) {
// Output strings and highlight the matches
$d_name = preg_replace(”/”.$search_string.”/i”, ””.$search_string.””, $result[’name’]);
$d_comp = $result[’company’];
$d_zip = $result[’zip’];
$d_city = $result[’city’];
// Replace the items into above HTML
$o = str_replace(’nameString’, $d_name, $html);
$o = str_replace(’compString’, $d_comp, $o);
$o = str_replace(’zipString’, $d_zip, $o);
$o = str_replace(’cityString’, $d_city, $o);
// Output it
echo($o);
}
}else{
// Replace for no results
$o = str_replace(’nameString’, ’No Names Found’, $html);
$o = str_replace(’compString’, ’’, $o);
$o = str_replace(’zipString’, ’’, $o);
$o = str_replace(’cityString’, ’’, $o);
// Output
echo($o);
}
}
?>
topsearch.php
query($query);
while($results = $result->fetch_array()) {
$result_array[] = $results;
}
foreach ($result_array as $result) {
// The output
echo ’’;
echo ’’.$result[’name’].’’;
echo ’’.$result[’company’].’’;
echo ’’.$result[’zip’].’’;
echo ’’.$result[’city’].’’;
echo ’’;
}
?>
See less