
rsammy
Members-
Posts
212 -
Joined
-
Last visited
Never
Everything posted by rsammy
-
more specifically, i need some help with this VB line here... totEven = CLng(Mid(txtPIN, 2, 1)) + CLng(Mid(txtPIN, 4, 1)) + CLng(Mid(txtPIN, 6, 1)) + CLng(Mid(txtPIN, 8, 1)) how do i code this one in javascript?! help with the whole function wud be great. but even this may help me a bit... THANX in advance
-
i need help in validating a physicians NPI. anyone has any idea how to do this in php or javascript? this is my code in vb...! Private Function validPIN() As Boolean ' PIN is exactly 10 digits numeric only string Dim txtPIN As String txtPIN = Trim(pin_txt.Text) If Len(txtPIN) = 10 And IsNumeric(txtPIN) Then ' 1/12/2007 - Perform the CDV Digit Check Dim totDoubleOdd As Long Dim totEven As Long Dim totPIN As Long Dim cdvPINdigit As Long ' Use double-add-double algorithm for odd numbered digits Dim i As Long Dim j As Long i = 1 totDoubleOdd = 0 For i = 1 To 9 Step 2 j = 2 * CLng(Mid(txtPIN, i, 1)) If j > 9 Then totDoubleOdd = totDoubleOdd + (j - 9) Else totDoubleOdd = totDoubleOdd + j End If Next ' Now add Even and calculate totPIN totEven = CLng(Mid(txtPIN, 2, 1)) + CLng(Mid(txtPIN, 4, 1)) + CLng(Mid(txtPIN, 6, 1)) + CLng(Mid(txtPIN, 8, 1)) totPIN = 24 + totDoubleOdd + totEven cdvPINdigit = totPIN Mod 10 If cdvPINdigit > 0 Then cdvPINdigit = 10 - cdvPINdigit End If ' Check against last digit of PIN If Right(txtPIN, 1) = CStr(cdvPINdigit) Then validPIN = True ' Success Else MsgBox "PIN Check Digit Failure - Verify your PIN and re-enter", vbOKOnly End If Else MsgBox "Please enter a valid PIN - Exactly 10 digits numeric string only", vbOKOnly End If End Function
-
[SOLVED] conversion of vb function into javascript...
rsammy replied to rsammy's topic in PHP Coding Help
thanx again. but, i am still stuck. i am trying to do this... function validateNPI(npi) //As Boolean { //NPI Check begins // PIN is exactly 10 digits numeric only string //$txtPIN; $txtPIN = trim($npi); // Perform the CDV Digit Check $totDoubleOdd; $totEven; $totPIN; $cdvPINdigit; // Use double-add-double algorithm for odd numbered digits //$i; //$j; $i = 1; $totDoubleOdd = 0; for($i = 1; $i = 9; $i+= 2) { $j = 2 * substr($txtPIN, $i, 1); if($j > 9) { $totDoubleOdd = $totDoubleOdd + ($j - 9); } else { $totDoubleOdd = $totDoubleOdd + $j; } } // Now add Even and calculate totPIN $totEven = substr($txtPIN, 2, 1) + substr($txtPIN, 4, 1) + substr($txtPIN, 6, 1) + substr($txtPIN, 8, 1); $totPIN = 24 + $totDoubleOdd + $totEven; $cdvPINdigit = $totPIN % 10; if($cdvPINdigit > 0) { $cdvPINdigit = 10 - $cdvPINdigit; } // Check against last digit of PIN if(substr($txtPIN, -1) = $cdvPINdigit) { //$validPIN = True; // Success return True; } else { return False; } } //End Function //END NPI check function validate() { var err_msg = new Array(); var i=0; var j=0; var bigstring = "Please correct the following errors:\n"; var loginID = ""; var pass = ""; var count = 0; var aMatch = false; var aBlank = false; firstName = document.addPhysician.fname.value; lastName = document.addPhysician.lname.value; homePhone = document.addPhysician.hphone.value; mobilePhone = document.addPhysician.mphone.value; zip = document.addPhysician.hzip.value; userName = document.addPhysician.userName.value; passWord = document.addPhysician.passWord.value; confirmPassWord = document.addPhysician.confirmPassWord.value; securityLevel = document.addPhysician.securityLevel.value; email = document.addPhysician.email.value; npi = document.addPhysician.npi.value; if (trim(firstName).length < 1) { err_msg[i] = "First name cannot be blank."; i++; } if (trim(lastName).length < 1) { err_msg[i] = "Last name cannot be blank."; i++; } if (trim(homePhone).length < 1) { err_msg[i] = "Home phone cannot be blank."; i++; } if (trim(homePhone).length >0) { if(!(validatePH(homePhone))) { err_msg[i] = "Home Phone number must be 10 digits or in this format: NNN-NNN-NNNN."; i++; } } if (trim(mobilePhone).length < 1) { err_msg[i] = "Mobile phone cannot be blank."; i++; } if (trim(zip).length > 0) { if(!(validateZIP(zip))) { err_msg[i] = "Postal Code does not appear to be in the correct format NNNNN or NNNNN-NNNN."; i++; } } if (trim(npi).length < 1) { err_msg[i] = "NPI cannot be blank."; i++; alert("ALERT 1"); } if ((trim(npi).length > 0) AND (trim(npi).length < 10)) { alert("here in length check"); err_msg[i] = "Invalid NPI. Must be 10 digits."; i++; } if (is_numeric (trim(npi)) == False) { alert("after length check"); err_msg[i] = "Invalid NPI. Must be 10 digits."; i++; } if ((validateNPI(npi)) == "False") { err_msg[i] = "NPI CDV check failed. Please re-enter."; i++; } if (trim(userName).length<1) { err_msg[i] = "Username cannot be blank."; i++; } if (trim(passWord).length<1) { err_msg[i] = "Password cannot be blank."; i++; aBlank = true; } if (trim(confirmPassWord).length<1) { err_msg[i] = "Confirm password cannot be blank."; i++; aBlank = true; } if(!aBlank) { if(passWord != confirmPassWord) { err_msg[i] = "The passwords do not match."; i++; } else { aMatch = true; } } if(aMatch) { var theReg = /\d/g; if(!(passWord.match(theReg)) || (passWord.length < ) { err_msg[i] = "The password must be at least 8 characters and contain at least one numeric character."; i++; } } if ((securityLevel.length<1)) { err_msg[i] = "Select a security level."; i++; } if (trim(email).length<1) { err_msg[i] = "Enter an email address."; i++; } if (i>0) { for (j=0; j<err_msg.length; j++) { count = j + 1; bigstring = bigstring + "\n" + count +". " + err_msg[j]; } alert (bigstring); return false; } else { return true; } } in function validate, it works upto the point where i check for a blank npi field. but it fails when i try to check the lenght between 1 and 10 characters!! is something wrong here. it skips the rest of the checks once it gets to this point. can u help me out here??? thanxxxxxx -
[SOLVED] conversion of vb function into javascript...
rsammy replied to rsammy's topic in PHP Coding Help
thanx a lot for ur reply! now, my question is.. how do i use this in this text page for the PIN field. how do i call this fucntion for this particular field PIN # field???!!! <?PHP //require_once ("phpInclude/config.php"); require_once ("../config.php"); include ("phpInclude/cookie.php"); if (isset($USER_NAME)) { list($user_fname, $user_lname) = explode (' ', $USER_NAME); if ($USER_NAME == ' Office Manager') { $query= "SELECT grp_name FROM group_details"; } else { $query= "SELECT grp_name FROM group_details, user_mgr WHERE user_mgr.user_fname='$user_fname' AND user_mgr.user_lname='$user_lname' AND user_mgr.user_grp_id=group_details.grp_id"; } $result=mysql_query($query); $row = mysql_fetch_array($result); $group_name = $row["grp_name"]; } if($USER_LEVEL != 2) { header("Location: main.php"); exit; } $message = ""; $goodMessage = ""; if (isset($_POST["action"])) { $user_name = $_POST["userName"]; $pass_word = $_POST["passWord"]; $security_level = $_POST["securityLevel"]; $email_address = $_POST["email"]; $first_name = $_POST["fname"]; $last_name = $_POST["lname"]; $home_phone = $_POST["hphone"]; $mobile_phone = $_POST["mphone"]; $home_address = $_POST["haddress"]; $home_city = $_POST["hcity"]; $home_state = $_POST["hstate"]; $home_zip = $_POST["hzip"]; $npi = $_POST["npi"]; $pass_word = trim($pass_word); $pass_word = crypt($pass_word); $user_name = trim($user_name); $query = "SELECT * FROM user_mgr WHERE user_logon='$user_name' or user_email='$email_address'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $row=mysql_fetch_array($result); $user_logon=$row["user_logon"]; $user_email=$row["user_email"]; if ($num_rows == 0) { $query = "INSERT INTO user_mgr(user_logon,user_pwd,user_fname,user_lname,user_home_ph,user_work_ph,user_auth,user_email, user_grp_id, wireless) VALUES('$user_name','$pass_word','$first_name','$last_name','$home_phone','$mobile_phone','$security_level','$email_address', '1', 'Yes')"; mysql_query($query); $user_id = mysql_insert_id(); //echo "$user_id"; $querys = "INSERT INTO phy_det (phy_fname, phy_lname, phy_home_ph, phy_mobile_ph, phy_pin, phy_email, phy_add, phy_city, phy_state, phy_zip, user_id, phy_disabled, phy_registered_by) VALUES ('$first_name', '$last_name', '$home_phone', '$mobile_phone', '$npi', '$email_address', '$npi', '$user_id' 'Enable', '$userid') "; mysql_query($querys); //print ("$querys"); $goodMessage = $first_name." ".$last_name." has been added to the users database."; } else { if($user_logon == $user_name) { $message = "A Provider with username \"".$user_name."\" is already registered."; } else { $message = "An Provider with email address \"".$email_address."\" is already registered."; } } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>ABC</title> <link rel='stylesheet' type='text/css' href='css/styleSheet.css'> <SCRIPT language="JavaScript" src="js/tree.js"> </SCRIPT> <SCRIPT language="JavaScript"> <?PHP //Navigation File //require_once ("phpInclude/nav.php"); require_once ("../nav.php"); ?> </SCRIPT> <script language="JavaScript"> function trim(inputString) { // Removes leading and trailing spaces from the passed string. Also // removes consecutive spaces and replaces it with one space. var retValue = inputString; var ch = retValue.substring(0, 1); while (ch == " ") { // Check for spaces at the beginning of the string retValue = retValue.substring(1, retValue.length); ch = retValue.substring(0, 1); } ch = retValue.substring(retValue.length-1, retValue.length); while (ch == " ") { // Check for spaces at the end of the string retValue = retValue.substring(0, retValue.length-1); ch = retValue.substring(retValue.length-1, retValue.length); } while (retValue.indexOf(" ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length); // Again, there are two spaces in each of the strings } return retValue; // Return the trimmed string back to the user } // Ends the "trim" function function validate() { var err_msg = new Array(); var i=0; var j=0; var bigstring = "Please correct the following errors:\n"; var loginID = ""; var pass = ""; var count = 0; var aMatch = false; var aBlank = false; firstName = document.addPhysician.fname.value; lastName = document.addPhysician.lname.value; homePhone = document.addPhysician.hphone.value; mobilePhone = document.addPhysician.mphone.value; zip = document.addPhysician.hzip.value; userName = document.addPhysician.userName.value; passWord = document.addPhysician.passWord.value; confirmPassWord = document.addPhysician.confirmPassWord.value; securityLevel = document.addPhysician.securityLevel.value; email = document.addPhysician.email.value; npi = document.addPhysician.npi.value; if (trim(firstName).length < 1) { err_msg[i] = "First name cannot be blank."; i++; } alert("HERE AFTER FIRST NAME"); if (trim(lastName).length < 1) { err_msg[i] = "Last name cannot be blank."; i++; } if (trim(homePhone).length < 1) { err_msg[i] = "Home phone cannot be blank."; i++; } if (trim(mobilePhone).length < 1) { err_msg[i] = "Mobile phone cannot be blank."; i++; } if (trim(zip).length > 0) { if(!(validateZIP(zip))) { err_msg[i] = "Postal Code does not appear to be in the correct format NNNNN or NNNNN-NNNN."; i++; } } if (trim(userName).length<1) { err_msg[i] = "Username cannot be blank."; i++; } //PIN Check begins // PIN is exactly 10 digits numeric only string //$txtPIN; $txtPIN = trim($pin) if(strlen($txtPIN) = 10 And is_numeric($txtPIN)) { // 1/12/2007 - Perform the CDV Digit Check $totDoubleOdd; $totEven; $totPIN; $cdvPINdigit; // Use double-add-double algorithm for odd numbered digits //$i; //$j; $i = 1 $totDoubleOdd = 0 for($i = 1; $i = 9; $i+= 2) { $j = 2 * substr($txtPIN, $i, 1) if($j > 9) { $totDoubleOdd = $totDoubleOdd + ($j - 9) } else { $totDoubleOdd = $totDoubleOdd + $j } } // Now add Even and calculate totPIN $totEven = substr($txtPIN, 2, 1) + substr($txtPIN, 4, 1) + substr($txtPIN, 6, 1) + substr($txtPIN, 8, 1) $totPIN = 24 + $totDoubleOdd + $totEven $cdvPINdigit = $totPIN % 10 if($cdvPINdigit > 0) { $cdvPINdigit = 10 - $cdvPINdigit } // Check against last digit of PIN if(substr($txtPIN, -1) = $cdvPINdigit) { //$validPIN = True; ' Success return True; } else { echo "PIN Check Digit Failure - Verify your PIN and re-enter"; //, vbOKOnly return False; } } else { echo "Please enter a valid PIN - Exactly 10 digits numeric string only"; //, vbOKOnly } //END PIN check if (trim(passWord).length<1) { err_msg[i] = "Password cannot be blank."; i++; aBlank = true; } if (trim(confirmPassWord).length<1) { err_msg[i] = "Confirm password cannot be blank."; i++; aBlank = true; } if(!aBlank) { if(passWord != confirmPassWord) { err_msg[i] = "The passwords do not match."; i++; } else { aMatch = true; } } if(aMatch) { var theReg = /\d/g; if(!(passWord.match(theReg)) || (passWord.length < ) { err_msg[i] = "The password must be at least 8 characters and contain at least one numeric character."; i++; } } if ((securityLevel.length<1)) { err_msg[i] = "Select a security level."; i++; } if (trim(email).length<1) { err_msg[i] = "Enter an email address."; i++; } if (i>0) { for (j=0; j<err_msg.length; j++) { count = j + 1; bigstring = bigstring + "\n" + count +". " + err_msg[j]; } alert (bigstring); return false; } else { return true; } } function validPIN($pin) //As Boolean { // PIN is exactly 10 digits numeric only string $txtPIN; $txtPIN = trim($npi) if(strlen($txtPIN) = 10 And is_numeric($txtPIN)) { // 1/12/2007 - Perform the CDV Digit Check $totDoubleOdd; $totEven; $totPIN; $cdvPINdigit; // Use double-add-double algorithm for odd numbered digits $i; $j; $i = 1 $totDoubleOdd = 0 for($i = 1; $i = 9; $i+= 2) { $j = 2 * substr($txtPIN, $i, 1) if($j > 9) { $totDoubleOdd = $totDoubleOdd + ($j - 9) } else { $totDoubleOdd = $totDoubleOdd + $j } } // Now add Even and calculate totPIN $totEven = substr($txtPIN, 2, 1) + substr($txtPIN, 4, 1) + substr($txtPIN, 6, 1) + substr($txtPIN, 8, 1) $totPIN = 24 + $totDoubleOdd + $totEven $cdvPINdigit = $totPIN % 10 if($cdvPINdigit > 0) { $cdvPINdigit = 10 - $cdvPINdigit } // Check against last digit of PIN if(substr($txtPIN, -1) = $cdvPINdigit) { //$validPIN = True; ' Success return True; } else { echo "PIN Check Digit Failure - Verify your PIN and re-enter"; //, vbOKOnly return False; } } else { echo "Please enter a valid PIN - Exactly 10 digits numeric string only"; //, vbOKOnly } } //End Function </Script> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin initial case cap function changeCase(frmObj) { var index; var tmpStr; var tmpChar; var preString; var postString; var strlen; tmpStr = frmObj.value; strLen = tmpStr.length; if (strLen > 0) { for (index = 0; index < strLen; index++) { if (index == 0) { tmpChar = tmpStr.substring(0,1).toUpperCase(); postString = tmpStr.substring(1,strLen); tmpStr = tmpChar + postString; } else { tmpChar = tmpStr.substring(index, index+1); if (tmpChar == " " && index < (strLen-1)) { tmpChar = tmpStr.substring(index+1, index+2).toUpperCase(); preString = tmpStr.substring(0, index+1); postString = tmpStr.substring(index+2,strLen); tmpStr = preString + tmpChar + postString; } } } } frmObj.value = tmpStr; } // End --> </SCRIPT> </head> <BODY onload="window.scroll(0,yoffset)"> <table width="900" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="4" bgcolor="#FFFFFF"> <div align="left"><font color="#FFFFFF"></font></div> <div align="right"><font color="#FFFFFF"><img src="images/title_barom.jpg" width="900" height="69"></font></div></td> </tr> <tr> <td align="left" valign="top" width="300"> <table width="300" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top"><div align="center"><font color="#006699"><img src="images/clear.gif" height="15" width="1"><b><?PHP print($group_name); ?><br> User: </b><?PHP print($USER_NAME); ?> </font></div></td> </tr> <tr> <td align="left" valign="top"> <SCRIPT language="JavaScript"> tree.loadState() tree.display() </SCRIPT> </td> </tr> </table> <p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><? print("<b>$copyright1</b>"); ?></p> </td> <td colspan="3" align="left" valign="top"> <br> <br> <table width="450" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#006699"> <tr> <td><img src="images/addUser_header.gif" height="17" width="450"></td> </tr> <tr> <td> <table width="450" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"><img src="images/clear.gif" width="1" height="15"></td> </tr> <tr> <td width="15"><img src="images/clear.gif" width="15" height="8"></td> <td width="425" align="left" valign="top"> <form name="addPhysician" method="post" action="addPhy.php" onSubmit="return validate()"> <table width="421" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="211"><img src="images/clear.gif" width="1" height="15"></td> <td width="210"> </td> </tr> <?PHP If ((strlen($message) > 0) || (strlen($goodMessage) > 0)) { ?> <tr> <td width="211"> <div align="right"> <?PHP if(strlen($message) > 0) { ?> <img src="images/errImg.gif" width="30" height="30"> <?PHP } else { ?> <img src="images/goodImg.gif" width="30" height="30"> <?PHP } ?> </div></td> <td width="210"> <?PHP if(strlen($message) > 0) { print("<font class=\"errTxt\">".$message."</font>"); } else { print("<font class=\"goodTxt\">".$goodMessage."</font>"); } ?> </td> </tr> <tr> <td width="211"> <div align="right"><img src="images/clear.gif" width="1" height="15"></div></td> <td width="210"> </td> </tr> <?PHP } ?> <tr> <td width="211"> <div align="right"><font class="inputLbl">First Name: </font></div></td> <td width="210"> <input class="txtboxLarge" type="text" name="fname" onBlur="javascript:changeCase(document.addPhysician.fname);"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Last Name: </font></div></td> <td width="210"> <input class="txtboxLarge" type="text" name="lname" onBlur="javascript:changeCase(document.addPhysician.lname);"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Home Phone (as 000-000-0000): </font></div></td> <td width="210"> <input class="txtboxLarge" type="text" name="hphone"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">PIN #: </font></div></td> <td width="210"> <input class="txtboxLarge" type="text" name="pin> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Email: </font></div></td> <td width="210"> <input class="txtboxLarge" type="text" name="email"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Username: </font></div></td> <td width="210"> <input class="txtboxLarge" type="text" name="userName"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Password: </font></div></td> <td width="210"> <input class="txtboxLarge" type="password" name="passWord"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Confirm Password: </font></div></td> <td width="210"> <input class="txtboxLarge" type="password" name="confirmPassWord"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"> <div align="right"><font class="inputLbl">Security Level: </font></div></td> <td width="210"> <select name="securityLevel"> <option value="4" selected>Provider</option> </select> <font class="redTxt">*</font> </td> </tr> <tr> <td width="211"><img src="images/clear.gif" width="1" height="15"></td> <td width="210"> </td> </tr> <tr> <td width="211"> </td> <td width="210"> <input class="sbttn" type="submit" name="action" value="Submit"> </td> </tr> </table> </form></td> <td width="15"><img src="images/clear.gif" width="15" height="1"></td> </tr> <tr> <tr> <td colspan="3"><img src="images/clear.gif" width="1" height="15"></td> </tr> </table></td> </tr> </table> <p> </p></td> </tr> <tr> <td align="left" valign="top" width="300"> </td> <td colspan="3"> </td> </tr> </table> </body> </html> <?PHP mysql_close(); ?> -
i have this function in vb. i need to use it in javascript on a php page. how can i do it? Private Function validPIN() As Boolean ' PIN is exactly 10 digits numeric only string Dim txtPIN As String txtPIN = Trim(pin_txt.Text) If Len(txtPIN) = 10 And IsNumeric(txtPIN) Then ' 1/12/2007 - Perform the CDV Digit Check Dim totDoubleOdd As Long Dim totEven As Long Dim totPIN As Long Dim cdvPINdigit As Long ' Use double-add-double algorithm for odd numbered digits Dim i As Long Dim j As Long i = 1 totDoubleOdd = 0 For i = 1 To 9 Step 2 j = 2 * CLng(Mid(txtPIN, i, 1)) If j > 9 Then totDoubleOdd = totDoubleOdd + (j - 9) Else totDoubleOdd = totDoubleOdd + j End If Next ' Now add Even and calculate totPIN totEven = CLng(Mid(txtPIN, 2, 1)) + CLng(Mid(txtPIN, 4, 1)) + CLng(Mid(txtPIN, 6, 1)) + CLng(Mid(txtPIN, 8, 1)) totPIN = 24 + totDoubleOdd + totEven cdvPINdigit = totPIN Mod 10 If cdvPINdigit > 0 Then cdvPINdigit = 10 - cdvPINdigit End If ' Check against last digit of PIN If Right(txtPIN, 1) = CStr(cdvPINdigit) Then validPIN = True ' Success Else MsgBox "PIN Check Digit Failure - Verify your PIN and re-enter", vbOKOnly End If Else MsgBox "Please enter a valid PIN - Exactly 10 digits numeric string only", vbOKOnly End If End Function thanxxxxxx
-
thanx, i figured it out too! problem solved
-
nevermind. thanx all for replying. i figured it out! problem solved.
-
thanx. problem solved
-
how do i format th etime in query below... SELECT batch_ID, Date_Format(batch_date_created, '%m/%d/%Y') as batch_date_created, batch_time_created FROM billing_batch WHERE Date_Format(batch_date_created, %m/%d/%Y) as batch_date_created <= '$dates' AND batch_date_created >= '$datez' ORDER BY batch_ID $select"; i need to display time in 12-hr format as hh:mm AM or PM i tried using '%h:%i A' - but it just displays as hh:mm A. how can i get the AM or PM to display? HELP PLLLLLLLLLEEEEEEEEEEEEEAAAAAAAAAAAAAAAAASE
-
this is my query. i need to check for length of pat_ssn! i shud not display it if it is greater than 9 digits!!! $query2="SELECT visit_mgr.visit_id, visit_mgr.visit_pat_id, visit_mgr.visit_phy_id, Date_Format(visit_mgr.visit_date, '%m/%d/%Y') as date, phy_det.phy_fname, phy_det.phy_minit, phy_det.phy_lname, pat_dgraphics.pat_first_name, pat_dgraphics.pat_last_name, Date_Format(pat_dgraphics.pat_dob, '%m/%d/%Y') as pat_birthday, pat_dgraphics.pat_ssn, pat_dgraphics.pat_ID, visit_mgr.client_id, dcn_approved_for_billing, dcn_posted_for_billing FROM visit_mgr, phy_det, pat_dgraphics, dcn WHERE visit_mgr.visit_type like '%$select1%' AND phy_det.phy_id=visit_mgr.visit_phy_id AND visit_mgr.visit_pat_id=pat_dgraphics.pat_ssn AND phy_det.phy_fname like '%$search3%' AND phy_det.phy_lname like '%$search4%' AND pat_dgraphics.pat_first_name like '%$search1%' AND pat_dgraphics.pat_last_name like '%$search2%' AND pat_dgraphics.pat_ssn like '%$search5%' AND visit_mgr.client_id $clientid AND visit_date <= '$dates' AND visit_date >= '$datez' AND dcn.dcn_tran_ID=visit_mgr.visit_palm_db_id AND dcn_posted_for_billing='No' ORDER BY $select3 $select"; any help please?
-
if it put a ',' there, it does not show me in the order selected(shows ascending by default). but if remove the ',' it shows an error on screen!
-
this is my query... $query2="SELECT batch_ID, batch_date_created, batch_time_created FROM billing_batch WHERE batch_date_created <= '$dates' AND batch_date_created >= '$datez' ORDER BY batch_ID, '$select'"; $select above is either ascending or descending on the screen based on option chosen from drop down box. i know the query is not corect at the ORDER BY point. how do i make it sort it accroding to option selected for '$select' ??? right now, it just displays ascending whatever i choose becos the syntax is wrong. HELP PLEASE....
-
tried it. it doesnt work! here is wat im doing... i am executing this query to get the messagevariable: ************* $querydisplay = "SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id, messages.tran_ID FROM messages WHERE messages.ID='$mess_id' AND messages.request !='settodelete'"; $resultdisplay = mysql_query($querydisplay); $num_rows = mysql_num_rows($resultdisplay); $rowdisplay = mysql_fetch_array($resultdisplay); $from_p = $rowdisplay["from_p"]; $to_email = $rowdisplay["to_email"]; $mesgtran_ID = $rowdisplay["tran_ID"]; $messagevariable = $rowdisplay["message"]; *************** [code] <tr> <td width="16"><img src="images/clear.gif" width="10" height="15"></td> <td width="601" bgcolor="#0099CC"> <div align="right"> <input type="hidden" name="mess_id" value="<?PHP print($rowdisplay["ID"]); ?>"> <input type="hidden" name="m1" value="<?PHP print("$m1"); ?>"> <input type="hidden" name="d1" value="<?PHP print("$d1"); ?>"> <input type="hidden" name="y1" value="<?PHP print("$y1"); ?>"> <input type="hidden" name="m2" value="<?PHP print("$m2"); ?>"> <input type="hidden" name="d2" value="<?PHP print("$d2"); ?>"> <input type="hidden" name="y2" value="<?PHP print("$y2"); ?>"> <input type="hidden" name="messagevariable" value="<?PHP print("$messagevariable"); ?>"> <? $_SESSION['messagevariable']=$messagevariable; ?> <input class="sbttnW" type="submit" name="forward" value="Forward"> <input class="sbttnW" type="submit" name="reply" value="Reply"> </div> </td> <td width="64"><img src="images/clear.gif" width="25" height="15"></td> </tr>[/code] i am using the following code to send it to compose.php from current page(view.php): [code] if (isset($_POST["reply"])) { header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); exit; } //forward the message if (isset($_POST["forward"])) { header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); exit; }[/code] and on the next page(compose.php) this is wat im doing: $messagevariable=$_POST["messagevariable"]; to retrieve the variable and trying to display it here!
-
say something like - $_SESSION['message']=$message; ???? and then call this in the next screen by using a post?
-
can u explain in detail please? im not too good in php! do u mean post/get?
-
this is my email screen on view.php: From: Barbara Ueckert To: Office Manager Received: 01/16/2007 3:58 PM ET Subject: Jack Jones - ICN Message: PATIENT NAME: Jack Jones VISIT DATE: 1/16/07 PATIENT #: 123456789 DOB: 03/18/1945 SEX: Male PREF PROVIDER: Barbara Ueckert REF #: STATUS: Follow VISIT TIME: 12:55 PM ATTENDING PROVIDER: Barbara Ueckert LOCATION: City Gen. Emgcy Facility DIAGNOSIS: 10-19% Bdy Brn/10-19% 3d - 948.11 PROCEDURE: 1 stage mohs, up to 5 spec - 17304;Ablate heart dysrhythm focus - 93651 TRANSACTION ID: 5967886 now, i have a forward button on the screen too, along with a reply button! when i hit them, i shud go to the next screen(compose.php) and i shud be abel to choose the recipient of this forwarded email. at the same time, i will still need to retain the original email and them be able to add some more text to it. the way this page works now is, i am not carrying over the message text(email body) to the next page(compose.php). the message is stored in the database in a blob! how do i carry the message over to the next page and then enable additional lines of text being added to the text on the next page? currently, i am able to display the recipient(drop down field with actual recipient selected by default), senders name, date and time messge was received and Subject. but, the message blob is not displayed. i need t odisplay this blob as well as be able to alter/add more lines of text to it.
-
forgot to show this: here is how the email body is: From: Barbara Ueckert To: Office Manager Received: 01/16/2007 3:58 PM ET Subject: Jack Jones - ICN Message: PATIENT NAME: Jack Jones VISIT DATE: 1/16/07 PATIENT #: 123456789 DOB: 03/18/1945 SEX: Male PREF PROVIDER: Barbara Ueckert REF #: STATUS: Follow VISIT TIME: 12:55 PM ATTENDING PROVIDER: Barbara Ueckert LOCATION: City Gen. Emgcy Facility DIAGNOSIS: 10-19% Bdy Brn/10-19% 3d - 948.11 PROCEDURE: 1 stage mohs, up to 5 spec - 17304;Ablate heart dysrhythm focus - 93651 TRANSACTION ID: 5967886
-
i am working on an email module in a patient application. i have some info on the email body (which is displayed as a message blob) apart from 'To' 'From' and 'Subject'. I also have reply and forward buttons. i need to send the logic to the same page, compose.php when either reply or forward is clicked. haviing said that, i need to display the original message (distinguish it with some mark or something -just as in outlook or hotmail) which cannot be edited while leaving some space for the new message! how is this possible? this is my code... [code] <form name="viewMessages" method="post" action="view.php"> <p><br> </p> <table width="681" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="16"><img src="images/clear.gif" width="10" height="15"></td> <td width="601" bgcolor="#0099CC"> <div align="right"> <input type="hidden" name="mess_id" value="<?PHP print($rowdisplay["ID"]); ?>"> <input type="hidden" name="m1" value="<?PHP print("$m1"); ?>"> <input type="hidden" name="d1" value="<?PHP print("$d1"); ?>"> <input type="hidden" name="y1" value="<?PHP print("$y1"); ?>"> <input type="hidden" name="m2" value="<?PHP print("$m2"); ?>"> <input type="hidden" name="d2" value="<?PHP print("$d2"); ?>"> <input type="hidden" name="y2" value="<?PHP print("$y2"); ?>"> <input type="hidden" name="messagevariable" value="<?PHP print("$messagevariable"); ?>"> <input class="sbttnW" type="submit" name="forward" value="Forward"> <input class="sbttnW" type="submit" name="reply" value="Reply"> </div> </td> <td width="64"><img src="images/clear.gif" width="25" height="15"></td> </tr> <td width="16"> </td> <td> <table width="601" border="1" cellspacing="0" cellpadding="0" bordercolor="#0099CC"> <tr> <td width="597"> <table width="597" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="15"> </td> <td width="85"> </td> <td width="270"> </td> <td width="212"> </td> <td width="37"><img src="images/clear.gif" width="10" height="15"></td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>From:</b></div></td> <!--<td colspan="2"> <?PHP print($rowdisplay["from_p"]); ?> </td>--> <td colspan="2"> <?PHP $queryfrom = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$from_p' "; //echo "$query"; $resultfrom = mysql_query($queryfrom); $rowfrom = mysql_fetch_array($resultfrom); //print($queryfrom); $fname= $rowfrom["user_fname"]; $lname=$rowfrom["user_lname"]; //$uname = $user_fname ." ". $user_lname; $uname = $fname ." ". $lname; print ($uname); ?> </td> <td width="37"> </td> </tr> <tr> <td> </td> <td><b>To:</b></td> <!--<td colspan="2"><? print($rowdisplay["to_email"]); ?></td>--> <td colspan="2"> <?PHP $queryto = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$to_email'"; $resultto = mysql_query($queryto); $rowto = mysql_fetch_array($resultto); $tofname= $rowto["user_fname"]; $tolname=$rowto["user_lname"]; $toname = $tofname ." ". $tolname; print ($toname); ?> </td> <td> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Received:</b></div></td> <!--<td colspan="2"> <?PHP print($rowdisplay["date"]); ?> </td>--> <td colspan="2"> <?PHP print($rowdisplay["date"]." ".$rowdisplay["time_sent"] . " ET"); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Subject:</b></div></td> <td colspan="2"> <?PHP print($rowdisplay["subject"]); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b></b></div></td> <td width="270"> </td> <td width="212"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Message:</b></div></td> <td colspan="2" rowspan="4" align="left" valign="top"> <?PHP print($rowdisplay["message"]); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td width="37"> </td> </tr> </table> </td> </tr> </table> </td> <td width="64"><img src="images/clear.gif" width="10" height="15"></td> </tr> </table> </form> </td> </tr> <tr> <td colspan="2"><div align="center"> <? if ($visit_type == ICN) { if ($dcn_posted_for_billing =="No") { if ($dcn_approved_for_billing =="No") { $requestforApproval='Yes'; print(" <br> <input class='sbttn' type='submit' name='action' value='Approve for Billing' onClick=\"location.href='main.php?mess_id=$mess_id&m1=$m1&d1=$d1&y1=$y1&m2=$m2&d2=$d2&y2=$y2&requestforApproval=$requestforApproval&mesgtran_ID=$mesgtran_ID'\"> "); } } } ?> </div></td> </tr> <tr> <td colspan="3" height="2"><div align="center"><br><br> <!--<input class="sbttn" type="submit" name="print" value="Print Friendly">--> <? print(" <br> <input class='sbttn' type='submit' name='action' value='Print Friendly' onClick=\"location.href='printMCtemplate.php?mess_id=$mess_id&m1=$m1&d1=$d1&y1=$y1&m2=$m2&d2=$d2&y2=$y2'\"> "); ?> </div></td> <td width="67"> </td> </tr> </table>[/code]
-
i amworking on a module where the office manager receives an email about a patient. the manager can then approve the message/patient for billing or can forward it to a biller in the group! i am stuck at the piont where the manager approves it for billing. when 'Approve for Billing' button is clicked on the email body in view.php, a table in the database, navigation should flow (back) to main.php - where the navigation started! and, 'approved_for_billing' field in dcn table of the database should be updated with the value 'Yes'. i am able to send the navigation back to main.php to show the exact same screen as where it came from. however, i am not able to update the dcn table with 'Yes' for the specified field! heres the code in main.php: [code]<?PHP require_once ("../config.php"); include ("phpInclude/cookie.php"); $dcn_approved_for_billing = $_GET["requestforApproval"]; $dcn_tran_id = $_GET["mesgtran_ID"]; //$dcn_approved_for_billing=$_POST["requestforApproval"]; //$dcn_approved_for_billing="YES"; $dcn_tran_id=$_POST["mesgtran_ID"]; print ("APP for Billing is ...: " .$dcn_approved_for_billing. "TRAN ID is ...: " . $dcn_tran_id); if (($dcn_approved_for_billing=='YES') OR ($dcn_approved_for_billing=='NO')) { print ("APP for Billing is ...: " .$dcn_approved_for_billing); $querydcn = "UPDATE dcn SET dcn_approved_for_billing='$dcn_approved_for_billing' WHERE dcn_tran_ID='$dcn_tran_id' "; mysql_query($querydcn); } $current = getdate(); $current_date = $current["mon"] . "/" . $current["mday"] . "/" . $current["year"]; $rowNum=$_GET["rowNum"]; if (isset ($_GET["m1"])) { $m1=$_GET["m1"]; $d1=$_GET["d1"]; $y1=$_GET["y1"]; $dbdate="$y1-$m1-$d1"; $m2=$_GET["m2"]; $y2=$_GET["y2"]; $d2=$_GET["d2"]; $dbdates="$y2-$m2-$d2"; } if (empty($m1)) { $m1=$current["mon"]; if ((!isset($d1)) || (empty($d1))) { $d1=$current["mday"]; } if ((!isset($y1)) || (empty($y1))) { $y1=$current["year"]; } $dbdate ="$y1-$m1-$d1"; //print "$dbdate"; $m2=$current["mon"]; $d2=$current["mday"]; $y2=$current["year"]; $dbdates ="$y2-$m2-$d2"; } if ($dbdate == $current["year"] . "-" . $current["mon"] . "-" . $current["mday"]) { ?> <script language="JavaScript"> //10000 is 10 Seconds var refreshTime = 60000; setTimeout('document.location=document.location',refreshTime); </script> <? } ?> <? $query = "SELECT user_fname, user_lname, user_email, user_logon, user_auth FROM user_mgr WHERE user_id='$userid' "; //echo "$query"; $result = mysql_query($query); $row = mysql_fetch_array($result); $user_fname= $row["user_fname"]; $user_lname=$row["user_lname"]; $USER_NAME = $user_fname ." ". $user_lname; $email_addy = $row["user_email"]; $user_logon=$row["user_logon"]; $user_auth=$row["user_auth"]; if ($user_auth == "3" OR $user_auth == "2") { $query= "SELECT grp_name FROM group_details"; } else { $query= "SELECT grp_name, user_auth FROM group_details, user_mgr WHERE user_mgr.user_fname='$user_fname' AND user_mgr.user_lname='$user_lname' AND user_mgr.user_grp_id=group_details.grp_id"; } //echo "$query"; $result=mysql_query($query); $row = mysql_fetch_array($result); $group_name = $row["grp_name"]; if ($user_auth == "2") { $queryz="SELECT message, user_id, status, from_p, subject, DATE_FORMAT(received, '%m/%d/%Y') as date, ID, to_email, time_sent, grp_id FROM messages WHERE received >='$dbdates' and received <='$dbdate' order by ID DESC "; $querysent="SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id FROM messages, sent_messages WHERE messages.received >='$dbdates' and messages.received <='$dbdate' and messages.id = sent_messages.message_id and sent_messages.user_id='$userid' order by messages.ID DESC"; } else { $queryz = "SELECT message, m.user_id, status, from_p, subject, DATE_FORMAT(received, '%m/%d/%Y') as date, ID, to_email, time_sent, grp_id FROM messages m,user_mgr u WHERE request !='settodelete' and received >='2006-12-25' and received <='2006-12-25' AND m.to_email =u.user_email and u.user_id = '111' order by ID DESC "; $querysent="SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id FROM messages, sent_messages WHERE messages.request !='settodelete' AND messages.user_id='$userid' and messages.received >='$dbdates' and messages.received <='$dbdate' and messages.id = sent_messages.message_id and sent_messages.user_id='$userid' order by messages.ID DESC"; } $resultz = mysql_query($queryz); $num_rowz = mysql_num_rows($resultz); $rowz= mysql_fetch_array($resultz); $inboxcounter = $num_rowz; $resultsent = mysql_query($querysent); $num_rowsent = mysql_num_rows($resultsent); $sentcounter = $num_rowsent; ?> <html> <head> <title>ABC</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel='stylesheet' type='text/css' href='css/styleSheet.css'> <SCRIPT language="JavaScript" src="js/tree.js"> </SCRIPT> <SCRIPT language="JavaScript"> <?PHP //Navigation File require_once ("../nav.php"); ?> </SCRIPT> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="900" border="0" cellspacing="0" cellpadding="0"> <tr align="left" valign="top"> <td colspan="2"> <img src="images/title_bar.gif" width="900" height="69"></td> </tr> <tr> <td align="left" valign="top" width="273"> <table width="243" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"><img src="images/clear.gif" width="10" height="15"></td> <td width="213"><div align="center"> <p><b><font color="#006699"><?PHP print($group_name); ?></b><b><BR> User:</b> <?PHP print("$USER_NAME"); ?></p> </div></td> </tr> <tr> <td width="10"> </td> <td width="213" bgcolor="#006699"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>Folders</b></font></div></td> </tr> <tr> <td width="10"> </td> <td width="213" align="left" valign="top"> <table width="240" border="1" cellspacing="0" cellpadding="0" bordercolor="#006699"> <tr> <td width="236" align="left" valign="top"> <table width="222" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="222"> </td> </tr> <tr> <td> <div align="left"> <img src="images/selectedfolder-icon.gif" width="16" height="13"> <a href="main.php">Inbox </a></div></td> </tr> <tr> <td> <div align="left"> <img src="images/selectedfolder-icon.gif" width="16" height="13"> <a href="sent.php">Sent Items </a></div></td> </tr> <tr> <td> <div align="left"> <img src="images/compose-button.gif" width="21" height="15"> <a href="compose.php?m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2">Compose</a></div></td> </tr> <tr> <td> <?PHP if($USER_LEVEL == 3) { ?> <div align="center"><img src="images/quit-button.gif" width="19" height="25" align="absmiddle"><a href="index.php">Logout</a></div> <? } ?> </td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td width="10"> </td> <td width="213"> <div align="center"></div></td> </tr> <tr> <td width="10" rowspan="4"> </td> <td width="213" align="left" valign="top"> </td> </tr> <?PHP if($USER_LEVEL != 3) { ?> <tr> <td align="left" valign="top" bgcolor="#006699"><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>Office Manager </b></font></div></td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top" wrap="soft"> <SCRIPT language="JavaScript"> tree.loadState() tree.display() </SCRIPT> </td> </tr> <tr> <td width="10" height="64"> <?PHP } ?> </td> </tr> </table></td> <td width="631" align="left" valign="top"><p> </p> <table width="94%" height="361" border="1" align="right" cellpadding="0" cellspacing="0" bordercolor="#006699"> <tr> <td bgcolor="#006699"><strong><font color="#FFFFFF">INBOX</font></strong></td> </tr> <tr> <td height="343" align="left" valign="top"> <form action="main.php" method="get" name="getmessages" id="getmessages"> <table width="84%" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="1%"> </td> <td width="2%"> </td> <td width="41%"> </td> <td width="46%"> </td> <td width="10%"> </td> </tr> <tr> <td> </td> <td> </td> <td><div align="right"><font class="inputLbl">From Date: </font></div></td> <td> <input name="m2" type="text" class="txtboxsm" value="<? if (isset($m2)){ print ("$m2"); } else { print("$m2"); }?>" size="3" maxlength="2" > / <input name="d2" type="text" class="txtboxsm" value="<? if (isset($d2)){ print ("$d2"); }?>" size="3" maxlength="2" > / <input name="y2" type="text" class="txtboxsm" value="<? if (isset($y2)){ print ("$y2"); }?>" size="6" maxlength="4" ></td> <td> </td> </tr> <tr> <td height="24"> </td> <td> </td> <td><div align="right"><font class="inputLbl">To Date: </font></div></td> <td> <input name="m1" type="text" class="txtboxsm" value="<? if (isset($m1)){ print ("$m1"); }?>" size="3" maxlength="2" > / <input name="d1" type="text" class="txtboxsm" value="<? if (isset($d1)){ print ("$d1"); }?>" size="3" maxlength="2" > / <input name="y1" type="text" class="txtboxsm" value="<? if (isset($y1)){ print ("$y1"); }?>" size="6" maxlength="4" > </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td><font class ="SELECT"> <input class="sbttn" type="submit" name="Submit" value="Search"> </font></td> <td> </td> </tr> </table> </form> <form name="viewMessages" method="post" action="viewMessage.php"> <table width="572" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="11"><img src="images/clear.gif" width="10" height="15"></td> <td width="1"> </td> <td> </td> <td> <input type="hidden" name="userid" value="<? print ("$userid"); ?>"> </td> <td> </td> <td> </td> <td><img src="images/clear.gif" width="10" height="15"></td> </tr> <tr> <td colspan="2" bordercolor="#006699" bgcolor="#0089B7"></td> <td width="34" bordercolor="#006699" bgcolor="#0089B7"></td> <td width="213" bordercolor="#006699" bgcolor="#0089B7"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>From</b></font></td> <td width="215" bordercolor="#006699" bgcolor="#0089B7"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>To</b></font></td> <td width="225" bordercolor="#006699" bgcolor="#0089B7"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>Subject</b></font></td> <td width="140" bordercolor="#006699" bgcolor="#0089B7"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"><b>Received</b></font></td> <td width="13" bordercolor="#006699" bgcolor="#0089B7"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF"> </font></td> </tr> <?PHP $num_results=mysql_num_rows($resultz); $i=1; if(!isset($rowNum)) { $rowNum = 0; } $rowNumHold = $rowNum; $count = 1; $limit_results = 25; if ($num_rowz > 0) { for($q=0;$q<$limit_results && $rowNum < $num_rowz;$q++) { if(mysql_data_seek($resultz, $rowNum++)) { if ($i++%2) { print ("<tr bgcolor=\"#cccccc\">"); } else { print ("<tr>"); } if ($rowz = mysql_fetch_array($resultz)) { ?> <td colspan="2"> </td> <td> <?PHP if($rowz["status"] == 1) { print("<img src=\"images/unopened-icon.gif\" width=\"18\" height=\"18\" border=\"0\">"); } else { print("<img src=\"images/opened-icon.gif\" width=\"18\" height=\"18\" border=\"0\">"); } ?> <td><a href="view.php<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ."&requestforApproval=".$requestforApproval ."&mesgtran_ID=".$mesgtran_ID); ?>" > <?PHP $from_p = $rowz["from_p"]; $fromquery="select user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$from_p'"; $resultfrom=mysql_query($fromquery); $fromrow= mysql_fetch_array($resultfrom); $from_fname = $fromrow["user_fname"]; $from_lname = $fromrow["user_lname"]; print($from_fname . " ". $from_lname); print("</div></td>"); ?></a></td> <td><a href="view.php<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ."&requestforApproval=".$requestforApproval ."&mesgtran_ID=".$mesgtran_ID ); ?>" > <?PHP $to_email = $rowz["to_email"]; $reciepientquery="select user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$to_email'"; $resultreciepient=mysql_query($reciepientquery); $reciepientrow= mysql_fetch_array($resultreciepient); $to_fname = $reciepientrow["user_fname"]; $to_lname = $reciepientrow["user_lname"]; print($to_fname . " ". $to_lname); print("</div></td>"); ?></a></td> <td><a href="view.php<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ."&requestforApproval=".$requestforApproval ."&mesgtran_ID=".$mesgtran_ID ); ?>"><?PHP print($rowz["subject"]); ?></a></td> <td><a href="view.php<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ."&requestforApproval=".$requestforApproval ."&mesgtran_ID=".$mesgtran_ID ); ?>"><?PHP print($rowz["date"]."<br>".$rowz["time_sent"]. " ET"); ?></a></td> <td colspan="8"> </td> </tr> <? } } } ?> <tr> <td colspan="2"> </td> <td colspan="4"> <div align="center"></div> <div align="center"> <? $pages = intval($num_rowz/$limit_results); if($num_rowz%$limit_results) { $pages++; } print("<b>Page</b> "); for($z=0;$z<$pages;$z++) { print("<a href=\"main.php?rowNum="); print ($limit_results*$z); print("&m1="); print($m1); print("&d1="); print($d1); print("&y1="); print ($y1); print("&m2="); print ($m2); print("&d2="); print($d2); print("&y2="); print ($y2); print("\">"); if(($z + 1) == (($rowNumHold/$limit_results) + 1)) { print("["); print($z + 1); print("]"); } else { print($z + 1); } print("</a> "); } print(" ($num_rowz records found)"); print("</div></td>"); print("</tr>"); } elseif ($num_results=='0') { ?> <tr> <td width="2" ></td> <td width="34" ></td> <td width="231"> No Messages ...</td> <td width="175"> </td> <td width="107" > </td> <td width="13"> </td> </tr> <?PHP } ?> </div> <td colspan="8"> </td> </tr> </table> </form> </td> </tr> </table> </td> </tr> </table> </body> </html> <?PHP mysql_close(); ?>[/code] and heres the code in view.php [code]<?PHP require_once ("../config.php"); include ("phpInclude/cookie.php"); $mess_id=$_GET["mess_id"]; $m1=$_GET["m1"]; $d1=$_GET["d1"]; $y1=$_GET["y1"]; $m2=$_GET["m2"]; $d2=$_GET["d2"]; $y2=$_GET["y2"]; $requestforApproval=$_GET["requestforApproval"]; $mesgtran_ID=$_GET["mesgtran_ID"]; $dbdates="$y2-$m2-$d2"; $dbdate ="$y1-$m1-$d1"; $query = "SELECT user_fname, user_lname, user_email, user_logon, user_auth FROM user_mgr WHERE user_id='$userid' "; $result = mysql_query($query); $row = mysql_fetch_array($result); $user_fname= $row["user_fname"]; $user_lname=$row["user_lname"]; $USER_NAME = $user_fname ." ". $user_lname; $email_addy = $row["user_email"]; $user_logon=$row["user_logon"]; $user_auth = $row["user_auth"]; if ($user_auth == "3" OR $user_auth == "2") { $query= "SELECT grp_name FROM group_details"; } else { $query= "SELECT grp_name FROM group_details, user_mgr WHERE user_mgr.user_fname='$user_fname' AND user_mgr.user_lname='$user_lname' AND user_mgr.user_grp_id=group_details.grp_id"; } $result=mysql_query($query); $row = mysql_fetch_array($result); $group_name = $row["grp_name"]; $query = "UPDATE messages SET status=2 WHERE user_id='$userid' AND ID='$mess_id'"; mysql_query($query); if ($user_auth == "2") { $querydisplay = "SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id, messages.tran_ID, user_mgr.user_fname, user_mgr.user_lname, user_mgr.user_id, user_mgr.user_email FROM messages, user_mgr WHERE messages.ID='$mess_id' AND user_mgr.user_id = messages.user_id"; } else { $querydisplay = "SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id, messages.tran_ID FROM messages WHERE messages.ID='$mess_id' AND messages.request !='settodelete'"; } $resultdisplay = mysql_query($querydisplay); $num_rows = mysql_num_rows($resultdisplay); $rowdisplay = mysql_fetch_array($resultdisplay); $from_p = $rowdisplay["from_p"]; $to_email = $rowdisplay["to_email"]; $mesgtran_ID = $rowdisplay["tran_ID"]; $messagevariable = $rowdisplay["message"]; $icnquery="SELECT visit_type from visit_mgr where palm_tran_ID='$mesgtran_ID'"; $icnresult=mysql_db_query("$database[dbname]", $icnquery); $icnr = mysql_fetch_array($icnresult); $visit_type=$icnr["visit_type"]; $dcnquery="SELECT * from dcn where dcn_tran_ID='$mesgtran_ID'"; $dcnresult = mysql_db_query("$database[dbname]", $dcnquery); $r = mysql_fetch_array($dcnresult); $dcn_posted_for_billing=$r["dcn_posted_for_billing"]; $dcn_approved_for_billing=$r["dcn_approved_for_billing"]; $dcn_tran_id=$r["dcn_tran_ID"]; //Delete the message if (isset($_POST["action"])) { $mess_id=$_POST["mess_id"]; $query = "UPDATE messages set request ='settodelete' WHERE user_id='$userid' AND ID='$mess_id'"; mysql_query($query); header("Location: main.php?m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]); exit; } //Reply to the message if (isset($_POST["reply"])) { header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); exit; } //forward the message if (isset($_POST["forward"])) { header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); exit; } //approve for billing if (isset($_POST["approval"])) { $requestforApproval='Yes'; header("Location: main.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&requestforApproval=".$_POST["requestforApproval"]."&mesgtran_ID=".$_POST["mesgtran_ID"]); exit; } //Print the message if (isset($_POST["print"])) { header("Location: printMCtemplate.php?mess_id=".$_POST["mess_id"]. "&print=".$_POST["print"]. "m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]); exit; } ?> <html> <head> <title>ABC</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel='stylesheet' type='text/css' href='css/styleSheet.css'> <SCRIPT language="JavaScript" src="js/tree.js"> </SCRIPT> <SCRIPT language="JavaScript"> <?PHP //Navigation File //require_once ("phpInclude/nav.php"); require_once ("../nav.php"); ?> </SCRIPT> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="900" border="0" cellspacing="0" cellpadding="0"> <tr align="left" valign="top"> <td colspan="2"> <img src="images/title_bar.gif" width="900" height="69"></td> </tr> <tr> <td align="left" valign="top" width="219"> <table width="271" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"><img src="images/clear.gif" width="10" height="15"></td> <td width="235" valign="top"> <div align="center"> <p><b><font color="#006699"><?PHP print($group_name); ?></font></b><font color="#006699"></font><br> <b><font color="#006699">User:</font></b><font color="#006699"> <?PHP print($USER_NAME); ?></font></p> <font color="#006699"></font></div></td> <td width="1"> </td> <td width="25"><img src="images/clear.gif" width="10" height="15"></td> </tr> <tr> <td width="10"> </td> <td width="235" bgcolor="#006699"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>FOLDERS</b></font></div></td> <td width="1"> </td> <td width="25"> </td> </tr> <tr> <td width="10"> </td> <td width="235" align="left" valign="top"> <table width="253" border="1" cellspacing="0" cellpadding="0" bordercolor="#006699"> <tr> <td width="249" align="left" valign="top"> <table width="224" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="224"> </td> </tr> <tr> <td> <div align="left"> <img src="images/selectedfolder-icon.gif" width="16" height="13"> Inbox </div></td> </tr> <tr> <td> <div align="left"> <img src="images/selectedfolder-icon.gif" width="16" height="13"> Sent Items </div></td> </tr> <tr> <td> <div align="left"> <img src="images/compose-button.gif" width="21" height="15"> <a href="compose.php">Compose</a></div></td> </tr> <tr> <td> <?PHP if($USER_LEVEL == 3) { ?> <div align="center"><img src="images/quit-button.gif" width="19" height="25" align="absmiddle"><a href="index.php">Logout</a></div> <? } ?> </td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table></td> <td width="1"> </td> <td width="25"> </td> </tr> <tr> <td width="10"> </td> <td width="235"> <div align="center"></div></td> <td width="1"> </td> <td width="25"> </td> </tr> <tr> <td width="10"> </td> <td width="235" align="left" valign="top"> <?PHP if($USER_LEVEL != 3) { ?> <table width="212" border="0" cellspacing="0" cellpadding="0" bordercolor="#006699"> <tr> <td width="208" align="left" valign="top"> <table width="250" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="247" bgcolor="#006699"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>Office Manager </b></font></div></td> </tr> <tr> <td> </td> </tr> <tr> <td> <SCRIPT language="JavaScript"> tree.loadState() tree.display() </SCRIPT> </td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> <?PHP } ?> </td> <td width="1"> </td> <td width="25"> </td> </tr> <tr> <td width="10"> </td> <td width="1"> </td> <td width="25"> </td> </tr> </table> </td> <td width="681" align="left" valign="top"> <form name="viewMessages" method="post" action="view.php"> <p><br> </p> <table width="681" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="16"><img src="images/clear.gif" width="10" height="15"></td> <td width="601" bgcolor="#0099CC"> <div align="right"> <input type="hidden" name="mess_id" value="<?PHP print($rowdisplay["ID"]); ?>"> <input type="hidden" name="m1" value="<?PHP print("$m1"); ?>"> <input type="hidden" name="d1" value="<?PHP print("$d1"); ?>"> <input type="hidden" name="y1" value="<?PHP print("$y1"); ?>"> <input type="hidden" name="m2" value="<?PHP print("$m2"); ?>"> <input type="hidden" name="d2" value="<?PHP print("$d2"); ?>"> <input type="hidden" name="y2" value="<?PHP print("$y2"); ?>"> <input type="hidden" name="inboxcounter" value="<?PHP print("$inboxcounter"); ?>"> <input type="hidden" name="sentcounter" value="<?PHP print("$sentcounter"); ?>"> <input type="hidden" name="messagevariable" value="<?PHP print("$messagevariable"); ?>"> <input class="sbttnW" type="submit" name="forward" value="Forward"> <input class="sbttnW" type="submit" name="reply" value="Reply"> </div> </td> <td width="64"><img src="images/clear.gif" width="25" height="15"></td> </tr> <td width="16"> </td> <td> <table width="601" border="1" cellspacing="0" cellpadding="0" bordercolor="#0099CC"> <tr> <td width="597"> <table width="597" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="15"> </td> <td width="85"> </td> <td width="270"> </td> <td width="212"> </td> <td width="37"><img src="images/clear.gif" width="10" height="15"></td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>From:</b></div></td> <td colspan="2"> <?PHP $queryfrom = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$from_p' "; $resultfrom = mysql_query($queryfrom); $rowfrom = mysql_fetch_array($resultfrom); $fname= $rowfrom["user_fname"]; $lname=$rowfrom["user_lname"]; //$uname = $user_fname ." ". $user_lname; $uname = $fname ." ". $lname; print ($uname); ?> </td> <td width="37"> </td> </tr> <tr> <td> </td> <td><b>To:</b></td> <td colspan="2"> <?PHP $queryto = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$to_email'"; $resultto = mysql_query($queryto); $rowto = mysql_fetch_array($resultto); $tofname= $rowto["user_fname"]; $tolname=$rowto["user_lname"]; $toname = $tofname ." ". $tolname; print ($toname); ?> </td> <td> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Received:</b></div></td> <!--<td colspan="2"> <?PHP print($rowdisplay["date"]); ?> </td>--> <td colspan="2"> <?PHP print($rowdisplay["date"]." ".$rowdisplay["time_sent"] . " ET"); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Subject:</b></div></td> <td colspan="2"> <?PHP print($rowdisplay["subject"]); ?> </td> <td width="37"> </td> </tr> <tr>
-
i suggested the same, but they insist on a button!
-
i am trying to create a button in the email body. when this button is clicked, a flag in the datbase is updated to Yes and the page remains where it is with the button gone! the button i created is, 'Approve for Billing'. Here is my code to execute this. whats wrong here? [code]<form name="viewMessages" method="post" action="view.php"> <p><br> </p> <table width="681" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="16"><img src="images/clear.gif" width="10" height="15"></td> <td width="601" bgcolor="#0099CC"> <div align="right"> <input type="hidden" name="mess_id" value="<?PHP print($rowdisplay["ID"]); ?>"> <input type="hidden" name="m1" value="<?PHP print("$m1"); ?>"> <input type="hidden" name="d1" value="<?PHP print("$d1"); ?>"> <input type="hidden" name="y1" value="<?PHP print("$y1"); ?>"> <input type="hidden" name="m2" value="<?PHP print("$m2"); ?>"> <input type="hidden" name="d2" value="<?PHP print("$d2"); ?>"> <input type="hidden" name="y2" value="<?PHP print("$y2"); ?>"> <input type="hidden" name="inboxcounter" value="<?PHP print("$inboxcounter"); ?>"> <input type="hidden" name="sentcounter" value="<?PHP print("$sentcounter"); ?>"> <input type="hidden" name="messagevariable" value="<?PHP print("$messagevariable"); ?>"> <input class="sbttnW" type="submit" name="reply" value="Reply"> </div> </td> <td width="64"><img src="images/clear.gif" width="25" height="15"></td> </tr> <td width="16"> </td> <td> <table width="601" border="1" cellspacing="0" cellpadding="0" bordercolor="#0099CC"> <tr> <td width="597"> <table width="597" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="15"> </td> <td width="85"> </td> <td width="270"> </td> <td width="212"> </td> <td width="37"><img src="images/clear.gif" width="10" height="15"></td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>From:</b></div></td> <td colspan="2"> <?PHP $queryfrom = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$from_p' "; //echo "$query"; $resultfrom = mysql_query($queryfrom); $rowfrom = mysql_fetch_array($resultfrom); //print($queryfrom); $fname= $rowfrom["user_fname"]; $lname=$rowfrom["user_lname"]; //$uname = $user_fname ." ". $user_lname; $uname = $fname ." ". $lname; print ($uname); ?> </td> <td width="37"> </td> </tr> <tr> <td> </td> <td><b>To:</b></td> <td colspan="2"> <?PHP $queryto = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$to_email'"; $resultto = mysql_query($queryto); $rowto = mysql_fetch_array($resultto); $tofname= $rowto["user_fname"]; $tolname=$rowto["user_lname"]; $toname = $tofname ." ". $tolname; print ($toname); ?> </td> <td> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Received:</b></div></td> <td colspan="2"> <?PHP print($rowdisplay["date"]." ".$rowdisplay["time_sent"] . " ET"); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Subject:</b></div></td> <td colspan="2"> <?PHP print($rowdisplay["subject"]); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b></b></div></td> <td width="270"> </td> <td width="212"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> <div align="left"><b>Message:</b></div></td> <td colspan="2" rowspan="4" align="left" valign="top"> <?PHP print($rowdisplay["message"]); ?> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td width="37"> </td> </tr> <tr> <td width="15"> </td> <td width="85"> </td> <td colspan="2"><div align="center"> <!--<? if ($visit_type == ICN) { if ($dcn_posted_for_billing =="No") { if ($dcn_approved_for_billing =="No") { $requestforApproval='Yes'; print(" <input class='sbttn' type='submit' name='action' value='Approve for Billing' onClick=\"location.href='view.php?approval=$requestforApproval&mess_id=$mess_id&m1=$m1&d1=$d1&y1=$y1&m2=$m2&d2=$d2&y2=$y2&tran_id=$mesgtran_ID'\"> "); } } else { $requestforApproval='No'; } } ?>--> <? if ($dcn_posted_for_billing =="No") { if ($dcn_approved_for_billing =="No") { $requestforApproval='Yes'; ?> <input class="sbttn" type="submit" name="billing" value="Approve for Billing"> <? } } else { $requestforApproval='No'; } /* $querydcn = "UPDATE dcn SET dcn_approved_for_billing='$requestforApproval' WHERE dcn_tran_ID='$mesgtran_ID' "; mysql_query($querydcn); */ ?> </div></td> <td colspan="2"><div align="center"> <input class="sbttn" type="submit" name="print" value="Print Friendly"> </div></td> <td width="67"> </td> <td colspan="2"><div align="center"> <input class="sbttn" type="submit" name="forward" value="Forward Message"> </div></td> <td width="37"> </td> </tr> </table> </td> </tr> </table> </td> <td width="64"><img src="images/clear.gif" width="10" height="15"></td> </tr> </table> </form>[/code] and here is the code i am using(existing code) to do a GET/POST etc., and update the table! i am kinda confused with the Header stuff... thats where i get an error! can someone help? [code] $mess_id=$_GET["mess_id"]; $m1=$_GET["m1"]; $d1=$_GET["d1"]; $y1=$_GET["y1"]; $m2=$_GET["m2"]; $d2=$_GET["d2"]; $y2=$_GET["y2"]; $inboxcounter=$_GET["incount"]; $sentcounter=$_GET["sentcount"]; $dbdates="$y2-$m2-$d2"; $dbdate ="$y1-$m1-$d1"; //Reply to the message if (isset($_POST["reply"])) { header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); //header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]."&messagevariable=".$_POST["messagevariable"]); exit; } //forward the message if (isset($_POST["forward"])) { header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); //header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]."&messagevariable=".$_POST["messagevariable"]); exit; } //approve for billig if (isset($_POST["billing"])) { $requestforApproval = $_GET["approval"]; $dcn_tran_id = $_GET["tran_id"]; $querydcn = "UPDATE dcn SET dcn_approved_for_billing='$requestforApproval' WHERE dcn_tran_ID='$dcn_tran_id' "; mysql_query($querydcn); //header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]); //header("Location: compose.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]."&messagevariable=".$_POST["messagevariable"]); header("Location: view.php?mess_id=".$_POST["mess_id"]. "&reply=".$_POST["reply"]. "&approval=".$_POST["requestforApproval"]. "&m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]."&inboxcounter=".$_POST["inboxcounter"]."&sentcounter=".$_POST["sentcounter"]."&messagevariable=".$_POST["messagevariable"]. "&tran_id=".$_POST["mesgtran_ID"]); exit; } //Print the message if (isset($_POST["print"])) { header("Location: printMCtemplate.php?mess_id=".$_POST["mess_id"]. "&print=".$_POST["print"]. "m1=".$_POST["m1"]."&d1=".$_POST["d1"]."&y1=".$_POST["y1"]."&m2=".$_POST["m2"]."&d2=".$_POST["d2"]."&y2=".$_POST["y2"]); exit; } $query = "UPDATE messages SET status=2 WHERE user_id='$userid' AND ID='$mess_id'"; mysql_query($query); if ($user_auth == "2") { $querydisplay = "SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id, messages.tran_ID, user_mgr.user_fname, user_mgr.user_lname, user_mgr.user_id, user_mgr.user_email FROM messages, user_mgr WHERE messages.ID='$mess_id' AND user_mgr.user_id = messages.user_id"; } else { $querydisplay = "SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject, DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id, messages.tran_ID FROM messages WHERE messages.ID='$mess_id' AND messages.request !='settodelete'"; } $resultdisplay = mysql_query($querydisplay); $num_rows = mysql_num_rows($resultdisplay); $rowdisplay = mysql_fetch_array($resultdisplay); $from_p = $rowdisplay["from_p"]; $to_email = $rowdisplay["to_email"]; $mesgtran_ID = $rowdisplay["tran_ID"]; $messagevariable = $rowdisplay["message"]; $icnquery="SELECT * from visit_mgr where palm_tran_ID='$mesgtran_ID'"; $icnresult=mysql_db_query("$database[dbname]", $icnquery); $icnr = mysql_fetch_array($icnresult); $visit_type=$icnr["visit_type"]; print ("VISIT TYPE is...: ". $visit_type); $dcnquery="SELECT * from dcn where dcn_tran_ID='$mesgtran_ID'"; $dcnresult = mysql_db_query("$database[dbname]", $dcnquery); $r = mysql_fetch_array($dcnresult); $dcn_posted_for_billing=$r["dcn_posted_for_billing"]; $dcn_approved_for_billing=$r["dcn_approved_for_billing"]; $dcn_tran_id=$r["dcn_tran_ID"];[/code]
-
no other way other than post? how can i use POST with the code i used?
-
is there a way to hide the info being posted between pages via a GET. what i mean is, when i am posting variables in a code like this: <php print("<input class='sbttn' type='submit' name='action' value='Remove from Billing Batch' onClick=\"location.href='billingMgtList.php?approval=$requestforApproval&select=$select&select1=$select1&select2=$select2&m1=$m1&d1=$d1&y1=$y1&m2=$m2&d2=$d2&y2=$y2&client_id=$client_id&tran_id=$visit_palm_db_id'\"> "); ?> when i do this in one page and receive these variables in another page using GET, the browser shows all the values being passed like this: http://www.abcxyz.com/OM/billingMgtList.php?[b]approval=Yes&select=DESC&select1=ICN&select2=visit_date%20DESC,%20visit_time&m1=&d1=&y1=&m2=&d2=&y2=&client_id=1&tran_id=1503251[/b] is there a way to hide the portion in bold from showing up on the browser address bar?