Hi there i m having some problems in creating and handling multiple buttons. The idea is that i have two buttons "Accept" and "Reject" and i want to give them differnt names using the variable $i from the for loop. Below i give you the code which shows what i am trying to do. The code has wrong syntax on purpose, in order to depict what i am trying to do!! [CODE] for ($i = 0; $i < count_req($getuser[0]['email']); $i++){ echo $req_array[$i]['s_fname']." ".$req_array[$i]['s_lname']; echo "<form><input type='submit$i' name='accept' value='Accept'> <input type='submit' name='reject$i' value='Reject'><br></form>"; echo "Request".count($_REQUEST); if($_REQUEST['accept$i'] == 'Accept') { echo "Accept"; …

Member Avatar
Member Avatar
+0 forum 3

Hello i am having a problem in removing all headers from a Part in java mail.The code i use : [CODE] Enumeration headers = part.getAllHeaders(); while (headers.hasMoreElements()) { Header h = (Header) headers.nextElement(); System.out.println(h.getName() + ": " + h.getValue()); part.removeHeader(h.getName()); } [/CODE] The System.out.println gives me right names an values!!But when i use part.removeHeader(h.getName()); nothing seems to be removed!!Has anybody any idea where is the problem or suggest me a new way to remove the Headers??

Member Avatar
+0 forum 0

I want to compute md5 hash from a MimeMessage type.I use the following code to do this: [CODE] //MD5 private static String convertToHex(byte[] data) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < data.length; i++) { int halfbyte = (data[i] >>> 4) & 0x0F; int two_halfs = 0; do { if ((0 <= halfbyte) && (halfbyte <= 9)) buf.append((char) ('0' + halfbyte)); else buf.append((char) ('a' + (halfbyte - 10))); halfbyte = data[i] & 0x0F; } while(two_halfs++ < 1); } return buf.toString(); } private static String MD5(String text) { MessageDigest md; md = MessageDigest.getInstance("MD5"); byte[] md5hash = …

Member Avatar
Member Avatar
+0 forum 1

The End.