php

Sending Email using Gmail SMTP in Swiftmail with PHP

Submitted by ronard on
Hi Sourcecodesterian, I would like to share this code that I used in my current project. This will teach you on how to send email using gmail smtp in swiftmail libraries. I used swiftmail because this is very easy to use and configure. Just follow the comments inside the script of index.php. Please ensure that you have gmail credentials to send message. Thank you for reading hope it will help you

Patients With Doctors Recorder

Submitted by killerzone on
Title: Patients With Doctors Recorder Language : PHP,ajax,javascript Tags: PHP Ajax Javascript Jquery Features: Management Add patient and Doctor Update patient and Doctor Delete patient and Doctor Search patient and Doctor System Requirements: Xampp 1.7.3 or below Chrome,Firefox,Opera. etc. How to Install? Download the following files by clicking download below Extract the zip files to htdocs

Save XML file from database record using PHP and MySQL

Submitted by ronard on
Hi to all sourcecodesterian, In last tutorial, we preview the XML tags to the browser. Now we are going to save the XML file to the directory which is "xmlBackup/". We make it in just clicking the Save XML link below the table. Then the script will save it directly to the said path above. How it will help you guys. Thank you for reading... Happy codings...

PHP RegEx: Meta Character class

Submitted by ronard on
We already seen the caret(^) as match the the beginning of string and (\z) match at the end of string that what they do. Now we are going to look with the others with beggining of bracket []. These Meta character are specifying a character class. What does the character class? This is a set of character that you want to match the string. They can listed individually like [abcdf] or a range [a-f]

PHP RegEx: With Meta Characters

Submitted by ronard on
In our last tutorials regarding ReGex we have some simple pattern of matching. We also use caret (^) For matching at the beginning of the string and (\z) to match at the end of the string. These characters are called Meta Characters and shown below. a. . (Full stop) b. ^ (Carat) c. * (Asterix) d. + (Plus) e. ? (Question Mark) f. { (Opening curly brace) g. [ (Opening brace) h. ] (Closing brace) i.

PHP RegEx: Match a pattern at the end of the string

Submitted by ronard on
In previous tutorial we have a pattern that match a string at the beggining using caret(^). Now we try to match the pattern at the end of the string using \z. What is \z? This is end of subject or read at the end of subject. We still use (i) case insensitive modifier so that it can read any case. The above script will generate "The string ends with nard" which is read at the end of the subject.

PHP RegEx: Case Insensitive

Submitted by ronard on
In previous tutorial we match at the beggining of the string given. But that is a case sensitive. If your condition like this: if(preg_match("/^ABC/", $string)) then the value of your string "abc". The script will returned with this message: No match found This is because of case sensitive. But in this script we will make the condition insensitive using regex "i" for insensitive. Shown below: Even

PHP RegEx: Match the Beginning of the String

Submitted by ronard on
In previous tutorial we match the given string. Now we are going to match at the beginning of the given string. The regex character to read beginning is the caret (^). Then we see if the string given begin with Ron. The forward slashes (/) we see are the delimeter that hold our regex pattern. And the quotations are used to 'wrap it all'. Then we see the (^) will put as the beggining of the string.

PHP RegEx: Match A String

Submitted by ronard on
In this tutorial I will show you the basic in regex. In brief discussion. Regex is considered a method of matching pattern within a string. In PHP usually used PCRE or "Perl Compatible Regular Expressions". Let's see a sample to print a string. The above code are printing "abcdefghijklmnopqrstuvwxyz0123456789". Now were going to match the character "xyz" using regex. The code above will output "1"