PHP - Email Format Validation
Hi, I need simple function to validate email address format.
I have found follwoing function form google. function isemail($email){ return (bool)ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email); } It's working fine with php < 5.2. But when I'm using with PHP 5.3 is says Quote Deprecated: Function ereg() is deprecated in C:\wamp\www\*******\includes\functions.php on line 28 Is any solution to this without error disable? Thanks Similar TutorialsScript sends out text/plain email using php's mail() construct .... all working fine. However, I had a user use Novell GroupWise to receive an email and it chops the formatting up pretty hard. Specifically, any \r\n characters are translated into =09=0D=0A and carriage returns are replaced with =5F=5F Right now, I am setting UTF-8 in the mail header, anyone know of a better, more universally accepted charset? i am beginner in php and trying to send email in html format using web form .for this purpose i added tinymce in my web form but when i send email i received email in broken html please help. my code is Code: [Select] <?php $send = $_POST['send']; if($send){ $email = $_POST['email']; $emailfile = file_get_contents("mailing.txt"); $emaillist = explode("\n", $emailfile); foreach ($emaillist as $value) { mail($value, $_POST['subject'], $_POST['message'], "From: $email"); } echo "<b>Email sent!</b><br />"; } ?> <script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Skin options skin : "o2k7", skin_variant : "silver", // Example content CSS (should be your site CSS) content_css : "css/example.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "js/template_list.js", external_link_list_url : "js/link_list.js", external_image_list_url : "js/image_list.js", media_external_list_url : "js/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); </script> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> <table width="481" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="84" align="right" valign="top" class="style32">Subject:</td> <td width="397" align="left" class="style32"> <input name="subject" type="text" id="subject" size="41" maxlength="100"> </td> </tr> <tr valign="top"> <td width="84" align="right" valign="top" class="style32">From:</td> <td align="left" class="style32"><input name="email" type="text" id="email" size="41" maxlength="100"></td> </tr> <tr valign="top"> <td align="right" valign="top" class="style32">Message:</td> <td align="left" class="style32"> <textarea name="message" cols="37" rows="4" id="message"></textarea> </td> </tr> <tr valign="top"> <td align="right" valign="top" class="style32"> </td> <td align="left" class="style32"> <input name="send" type="submit" id="send" value="SUBMIT"> <input name="Reset" type="reset" id="Reset" value="RESET"> </td> </tr> </table> </form> My website sends me an e-mail when there is an error, and I would like it to look like this... Code: [Select] Date: 2012-03-17 12:36:46pm Results Code: EMAIL_USER_NOT_LOGGED_IN_2127 Error Page: /members/change_email.php Member ID: 0 IP Address: 127.0.0.1 Host Name: localhost However my PHP code isn't giving me that... $body = "A website error has occurred...\n\n"; $body .= "Date: \t\t" . date('Y-m-d g:i:sa', time()) ."\n"; $body .= "Results Code: \t\t" . $resultsCode . "\n"; $body .= "Error Page: \t\t" . $errorPage . "\n"; $body .= "Member ID: \t\t" . $memberID . "\n"; $body .= "IP Address: \t\t" . $ip . "\n"; $body .= "Host Name: \t\t" . $hostName . "\n"; What is wrong? Thanks, Debbie Hi, I'm trying to make an order form in php, basically I want the email to be sent to different email address in different email format, but I'm stuck with the code, can anyone help me with this, please? I've been trying to figure it out for a couple of days but I still can't solve it, my background is not in programming so, I think this must be really easy for programmers, but it's been causing me a headache. Below is the code that I've been stuck. <?PHP /* SUBJECT AND EMAIL VARIABLE */ $emailSubject = ' crystal ashley order form '; $webMaster = 'tjoengkikitjahyadi@gmail.com, james.k.tj@gmail.com '; /* gathering data variable */ $emailField = $_POST['email'] ; $recipientField = $_POST['recipient'] ; $nameField = $_POST['name'] ; $phoneField = $_POST['phone'] ; $codeField = $_POST['code'] ; $quantityField = $_POST['quantity'] ; $hearField = $_POST['hear'] ; $classField = $_POST['class'] ; $commentsField = $_POST['comments'] ; $body = <<<EOD <br><hr><br> Email : $email <br> Recipient : $recipient <br> Phone : $phone <br> Code : $code <br> Code : $code2 <br> Hear from : $hear <br> Interested in : $class <br> Comments : $comments <br> <br> EOD; $headers = "From : $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); Email : $email <br> Name : $name <br> Phone : $phone <br> Code : $code <br> Code : $code2 <br> Hear from : $hear <br> Interested in : $class <br> Comments : $comments <br> <br> EOD; $headers = "From : $email\r\n"; $headers = "To : $recipient\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /*results rendered as html*/ $theResults = <<<EOD <html> <head> <title>Real Yoga Enquiry Form</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { background-color: #f1f1f1; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: normal; font-weight: normal; color: #666666; text-decoration: none; } --> </style> </head> <div> <div align="left">Thank you for your interest! Your email will be answered very soon!</div> </div> </body> </html> EOD; echo "$theResults"; ?> This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=355929.0 Hey guys.. I'm completely done with my contact form data validation except I cannot seem to get one part. For my email field I need to make sure that it is a valid email address and not just words. Also, I would like to make the phone number specific length. Any ideas on how to go about this? thanks guys! <?php ini_set('display_errors', '0'); //Define Variables. $FirstName = $_GET['FirstNameTextBox']; $LastName = $_GET['LastNameTextBox']; $PhoneNumber = $_GET['PhoneNumberTextBox']; $EmailAddress = $_GET['EmailAddressTextBox']; $Address = $_GET['AddressTextBox']; $City = $_GET['CityTextBox']; $State = $_GET['StateDropDownBox']; $Zip = $_GET['ZipTextBox']; $error1='*Please enter a First Name<br>'; $error2='*Please enter a Last Name<br>'; $error3='*Please enter a Phone Number<br>'; $error4='*Please choose a state<br>'; $error5='*Please enter a valid email address<br>'; $day2 = mktime(0,0,0,date("m"),date("d")+2,date("Y")); $day3 = mktime(0,0,0,date("m"),date("d")+3,date("Y")); $day7 = mktime(0,0,0,date("m"),date("d")+7,date("Y")); // Array to collect messages $messages = array(); //Display errors. if($FirstName=="") {$messages[] = $error1; } if($LastName=="") {$messages[] = $error2; } if($PhoneNumber=="") {$messages[] = $error3; } if($State=="") {$messages[] = $error4; } if($EmailAddress=="") {$messages[] = $error5; } // Don't do this part unless we have no errors if (empty($messages)) { //Display correct contact date. if($State == "NY") { $messages[] = "Hello $FirstName $LastName! Thank you for contacting me. I will get back to you within 2 days, before " .date("d M Y", $day2); } if($State == "NJ") { $messages[] = "$Hello FirstName $LastName! Thank you for contacting me. I will get back to you within 3 days, before " .date("d M Y", $day3); } if($State == "Other") { $messages[] = "$Hello FirstName $LastName! Thank you for contacting me. I will get back to you within 1 week, before " .date("d M Y", $day7); } } // END if empty($messages echo implode('<BR>', $messages); ?> <p>--<a href="Contact_Form.html" class="style2"><span class="style1">Go Back</span></a>--</p> </body> </html> Hi, I have done email validation. At present it shows invalid email address if I kept blank but in the same time inserted the records in database. I want user to stay at the same page if anything is invalid. if(!empty($_POST['emailId'])){ if(preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $_POST['emailId'])){ $records['Email']=$_POST['emailId']; } else{ $emsg="Please enter valid Email address"; }} else{ $emsg="Please enter valid Email address"; } And I have used like <tr><td>Email id</td><td><input type="text" name="emailId"></td><td><?php echo ".$emsg." ;?></td></tr> Can anybody help me in this regard? So, im trying to make my job a little easier. lol... I am constantly sending emails to the managers for escalations on calls... So I wrote this so far... (forgive my poor php skills, this is the first thing ive ever made. lol.) It does work so far, but, a friend wants to use it too, and Ive adapted it so he can enter his email address in, but, how can I make it so that it will validate only to send from @specificdomain.com ? Ive tried a few things, and just butchered it. lol.... Thanks for any help or tips. Code: [Select] <?php //$name = $_POST["email"]; $name = $_POST["name"]; $policynumber = $_POST["policynumber"]; $phonenumber = $_POST["phonenumber"]; $issue = $_POST["issue"]; $purchased = $_POST ["purchased"]; $infocheck = $_POST ["infocheck"]; $additionalinfo = stripslashes($_POST["additionalinfo"]); //checkbox value readout $mailcc = $_POST['sendmetoo']; $email_to = "SalesLevel2@specificurl.com"; // Who the email is to $email_from = $_POST['emailfrom']; // Who the email is from $email_subject = $policynumber.' - '.$issue; // The Subject of the email //here you can define whatever you want to... $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=UTF-8\r\n"; $headers .= "To: <".$email_to.">\r\n"; $headers .= "From: ".$email_from."\r\n"; //we control if sendmetoo is checked... if($mailcc == 'sendtome'){ $headers .= "Cc: ".$email_from."\r\n"; } //$headers .= "Bcc: noone@nowhere.com\r\n"; $email_message = "Sales Level 2,"; $email_message .= "\n\nPolicy Number: " .$policynumber; $email_message .= "\nClients Name: " .$name; $email_message .= "\nPhone Number: " .$phonenumber; $email_message .= "\nReason(s): " .$issue; $email_message .= "\nPurchased Already: " .$purchased; $email_message .= "\nAll info correct?: " .$infocheck; $email_message .= "\n\nAdditional Information: " .$additionalinfo; "\n\n\n\n". // Message that the email has in it //$headers = "From: ".$email_from; $ok = @mail($email_to, $email_subject, $email_message, $headers); if($ok) { echo "<font face=verdana size=2><center>Your message has been sent<br> to Sales Level 2<br> Click <a href=\"#\" onclick=\"history.back();\">here</a> to go back</center>"; } else { die("Sorry but the email could not be sent. Please go back and try again!"); } ?> I am working on user validation through email and I am having some problems with it. I can get it to work but it gives me probloms some times. This is the link that is sent to the users after they sign up Code: [Select] mydomain/confirm.php?id=".$id."&userkey=".$userkey and this is what i have for the confirm page Code: [Select] <?php //connection info $userquery = mysql_query("SELECT * FROM user"); $active=mysql_result($userquery, "active"); $userid=mysql_result($userquery, "id"); $userkey=mysql_result($userquery, "userkey"); if ($active == 1) { printf("This account has already been activated"); echo "<br />"; } elseif($userkey != $posteduserkey){ printf("We are sorry but the data offered does not match data listed, plese contact system admin."); } else{ $query="UPDATE user SET active='1' WHERE id='$id'"; mysql_query($query) or die (mysql_error()); echo "You have activated your account"; ?> <div align="center"><br /><a href="login.php" class="nav">Back to the log in page</a></div> <?php } ?> This is the fun part. I checked that the id and userkey are correct in the link, and they are. I then replaced the & in the link with & it works in gmail but not yahoo email address. I'm not sure where else to look. Thanks in advance Hello i have a syntax issue in the code below, can anyone shed some light? Code: [Select] <?php if(isset($_POST['submit'])) { $drop = mysql_real_escape_string($_POST['drop_1']); $tier_two = mysql_real_escape_string($_POST['Subtype']); echo "You selected "; echo $drop." & ".$tier_two; $Name = mysql_real_escape_string($_POST["Name"]); $Phone = mysql_real_escape_string($_POST["Phone"]); $Email = mysql_real_escape_string($_POST["Email"]); $Postcode = mysql_real_escape_string($_POST["Postcode"]); $Website = mysql_real_escape_string($_POST["Website"]); if($Name == '' || $Phone == '' || $Email == '' else if (!preg_match('/^[A-Za-z0-9\-.]+$/', $domain)|| $Postcode == '' || $Website == '') { die('<br> but you did not complete all of the required fields correctly, please try again'); } } the code works fine without the " else if (!preg_match('/^[A-Za-z0-9\-.]+$/', $domain) " . As well as checking for blank fields i'd like to check for the correct email format. Many thanks. Hi guys, Trying to ge this to work: function checkEmail($useremail) { if (!preg_match("/^( [a-zA-Z0-9] )+( [a-zA-Z0-9\._-] )*@( [a-zA-Z0-9_-] )+( [a-zA-Z0-9\._-] +)+$/" , $useremail)) { return false; $error = '<div id="blackText"><p>Sorry! Please check your email address and try again!<p><p><a href="forumsSignUp.php">Back</a></p></div>'; } return true; //PASSWORD AND OTHER VALIDATION STUFF, blah blah blah } But its just not. Everything works fine if I remove this though. Can anyone suggest an alternative to email address validation? Thanks! Hey all, trying to figure out a logic flaw in this validation script. Basically if I use !preg_match or the preg_match examples (noted below), I do not get the correct results.
My interpretation of preg_match and my current understanding of the logic is noted below (please correct me if I'm wrong).
1. If I use alternate attempt !preg_match, the regex would be compared against the "string" in the $email variable. If the regex expression matches, error will be thrown and script would stop.
2. If I use alternate attempt !preg_match, the condition would be not true and move to else where the string contained within $email variable would be run through the vld function.
3. If I maintain the current script using preg_match, if the string matches the match, the condition would be true and therefore string of $email variable runs through VLD function else cleanup and throw error...
Are my statements above correct in this context? I think I'm pretty close to cracking it but seem to be missing something simple.
The current script is referenced below, forgive me if I've lost the plot. Long hours attempting to understand this language, from what I've seen so far its great.
Thanks in advance,
A
//Alternate attempt
if (!preg_match("/^[^@]+@[^@.]+\.[^@]*\w\w/", $email)) { $error = "Please enter a valid email address"; } else { $email = vld($_POST['email']); } Current code that doens't work: if (empty($_POST['email'])) { $error = "Email is required"; } else { if (strlen($_POST['email']) < 5) { $error = "Email is too short!"; } else { if (strlen($_POST['email']) > 30) { $error = "Email is too long!"; } else { if (preg_match("/[\(\)\<\>\,\;\:\\\"\[\]]/", $email)) { $error = "The email address contains illegal characters"; } else { if (preg_match("/^[^@]+@[^@.]+\.[^@]*\w\w/", $email)) { $email = vld($_POST['email']); } else { $error = "Please enter a valid email address"; } } } } } } I am using this a modal window(jBox) - with a web Form in it, that requires the Form (just Name & Email) to be completed and Submitted in order to close the modal window - allowing access to the main page. The Form uses this corresponding ../submit.php which this: if (empty($_POST['name'])|| empty($_POST['email'])){ $response['success'] = false; } else { $response['success'] = true; } echo json_encode($response); where, upon Form > submit, successfully shows 'error' if the Form fields are not populated, and 'success' when the Form fields are populated/submitted.
I'd like the Form to require a proper/valid email address and avoid spam and header injection Any assistance/guidance is appreciated
Hey everyone. I hope you can help me getting through this problem, because I have no idea of what else to try. I'm a web designer and sometimes modify Javascript, but my main focus is HTML and CSS, meaning I have no idea how to code in Javascript, but most importantly, how to write something from scratch in PHP. So I designed a form that works pretty well, and integrated a PHP and Javascript script to make it work. This is the form: Code: [Select] <form name="form" id="form" method="post" action="contact.php"> <p>Hello,</p> <p>My name is <input type="text" name="name">, from <input type="text" name="location">, and I'd like to get in touch with you for the following purpose:</p> <p><textarea name="message" rows="10" ></textarea></p> <p>By the way, my email address is <input type="text" name="email" id="email" placeholder="john@doe.com">, and I can prove I'm not a robot because I know the sky is <input type="text" name="code" placeholder="Red, green or blue?">.</p> <p title="Send this message."><input type="submit" id="submit" value="Take care."></p> </form> And this is the script, in an external file called contact.php: Code: [Select] <?php $name = check_input($_REQUEST['name'], "Please enter your name.") ; $location = check_input($_REQUEST['location']) ; $message = check_input($_REQUEST['message'], "Please write a message.") ; $email = check_input($_REQUEST['email'], "Please enter a valid email address.") ; if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)) {die("E-mail address not valid");} if (strtolower($_POST['code']) != 'blue') {die('You are definitely a robot.');} $mail_status = mail( "my@email.com", "Hey!", "Hello,\n\n$message\n\nRegards,\n\n$name\n$location", "From: $email $name" ); function check_input($data, $problem='') { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); if ($problem && strlen($data) == 0) { show_error($problem); } return $data; } function show_error($myError) { ?> <html> <body> <b>Please correct the following error:</b><br /> <?php echo $myError; ?> </body> </html> <?php exit(); } if ($mail_status) { ?> <script language="javascript" type="text/javascript"> alert('Thank you for the message. I will try to respond as soon as I can.'); window.location = '/about'; </script> <?php } else { ?> <script language="javascript" type="text/javascript"> alert('There was an error. Please try again in a few minutes, or send the message directly to aalejandro@bitsland.com.'); window.location = '/about'; </script> <?php } ?> So what it does is this: if everything's OK, it sends an email with "Hey!" as the subject, "[name]" as the sender, "Hello, [message]. Regards, [name], [location]" as the body, and a popup saying the message was delivered appears. If something fails, it outputs the error in a new address, so the user will have to go back to the form and correct the error. What I actually want to happen is this: if everything's OK, a <p> which was hidden beneath the form appears saying the message was delivered, or, alternatively, make the submit button gray out and confirm the message was delivered. I found a script to make this happen, but with "Please wait...", so the user can't resubmit the form. If there's an error, I'd like another <p> which was hidden to appear with the specific error, so there'd be many <p>'s hidden with different IDs. If possible, I'd also like to change the CSS style of the input field, specifically changing the border color to red, so it'd be a change in class for the particular field. -- So in essence, I want the errors and the success messages to output in the same page as the form (without refresh), and a change of class in the input fields that have an error. Thanks in advance, and please let me know if it'll be possible. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=359169.0 Hello guys, I just want to ask if someone can share me codes in php where i can validate the connection of the mail server. I am going to trap this error: Quote Warning: mail() [function.mail]: Failed to connect to mailserver.... Instead of this message showing, I want it to be formal. It will be like this: Quote You cannot connect to you're mail server. Please contact the administrator. And lastly I want to have a validation if an email is existing or not. I want a script which checks first the email if it is existing before sending the message. I hope someone will post their idea here. Thanks in Advance. --CHILL I have made a form that asks a user for email, first name, last name, and password. I am using Spry validation tools in Dreamweaver. When I used those only, I did not have a problem. The problem began once I tried to actually check to see if the email was already registered. I have tried changing so many things like what $_POST variable to look for at the beginning, to different db connection arrangements. I am stumped. The only other thing I can think of is that I have the order wrong somehow in the logic. Thanks for the help. First, here is the form: Code: [Select] Enter Email<?php if($error_email_taken) echo ": $error_email_taken."; ?> <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input name="email" type="text" id="email" value="<?php if($_POST["email"]) echo $_POST["email"]; ?>"> <input name="first" type="text" id="first" value="<?php if($_POST["first"]) echo $_POST["first"]; ?>"> <input name="last" type="text" id="last" value="<?php if($_POST["last"]) echo $_POST["last"]; ?>"> <input name="pass" type="password" class="formText1" id="pass" value="<?php if($_POST["pass"]) echo $_POST["pass"]; ?>"> <input type="submit" name="Submit" value="Submit"></td> </form> And the email verification and insert, which is placed before the opening html tag. Code: [Select] <?php if($_POST['Submit']) { //Check to see if email is registered. $email = $_POST['email']; $dbc=mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $q_1 = "SELECT users_email FROM table WHERE users_email = $email"; $r_1 = mysqli_query($dbc, $q_1); $rows_1 = mysqli_num_rows($r_1); if ($rows_1 == 0) { //If 0, email is not already registered. $new_email = $_POST['email']; } else { $error_email_taken = "This email is already registered."; } //If everything is good, insert the information. if(isset($new_email)) { $first_name = $_POST['first']; $last_name = $_POST['last']; $password = $_POST['pass']; //Insert User information. $q_2 = "INSERT INTO table (users_email, users_first, users_last, users_pass) VALUES ('$new_email', '$first_name', '$last_name', '$password')"; $r_2 = mysqli_query($dbc, $q_2); //Go to new page if form was submitted and information properly inserted. header('Location: new_page.php'); }//End: if($new_email) } //End: if $_POST['submit'] ?> I've simplified it as much as I could. I totally eliminated stuff like a password hash, etc. because I wanted to get it down to the most simple form, so once this gets working, I'll add that other stuff later. Thanks so much again. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349030.0
Hello All, function convertTimeFormat($time12Hour) { // Initialized required variable to an empty string. $time24Hour = ""; // Used explode() function to break the string into an array and stored its value in $Split variable. $Split = explode(":",$time12Hour); // print_r(explode (":", $time12Hour)); => Array ( [0] => 09 [1] => 50 [2] => 08AM ) // Retrieved only "hour" from the array and stored in $Hour variable. $Hour = $Split[0]; $Split[2] = substr($Split[2],0,2); // Used stripos() function to find the position of the first occurrence of a string inside another string. if($Hour == '12' && strpos($time12Hour,"AM")!== FALSE) { // Code here } elseif(strpos($time12Hour,"PM")!== FALSE && $Hour != "12") { // code here } return $time24Hour; } $time12Hour = "09:50:08AM"; $result = convertTimeFormat($time12Hour); print_r($result); /* Input : "09:50:08AM"; Output : "21:50:08PM"; */
|