Featured Post Today
print this page
Latest Post

PHP | Name Validation Function

PHP Name Validation Function
function validate_name($input_name)
   {  
   $input_name = preg_match("/^[a-zA-Z ]*$/", $input_name);
   $input_name = trim($input_name);  
            $input_name = htmlspecialchars($input_name);  
            $input_name = stripcslashes($input_name);
   return $input_name;
   }
0 comments

PHP | Number Validation Function

PHP number validation function
function validate_number($input_number)
   {  
   $input_number = preg_match ("/^[0-9]*$/", $input_number);
   $input_number = trim($input_number);  
            $input_number = htmlspecialchars($input_number);  
            $input_number = stripcslashes($input_number);
   return $input_number;
   }
0 comments

PHP | Form Validation Function

PHP Form Validation Function for your site.
function validate_email($input_email)
   {  
   $input_email = preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $input_email);
   $input_email = trim($input_email);  
            $input_email = htmlspecialchars($input_email);  
            $input_email = stripcslashes($input_email);
   return $input_email;
   }
0 comments

C++ | Usages of Arrays elements| Lecture 8

Lecture 8:
Here you will learn that how to use arrays elements and how to pray with them?
Arrays elements are located or called by their place number or name. Arrays elements place starts from [0]... to so on.

 /*  
  Name: More on arrays  
  Copyright: sameearticles.blogspot.com  
  Author: Samee Ullah Feroz  
  Date: 05/03/14 15:17  
  Description: Here you will learn about usage of arrays element.   
 */  
 #include <iostream>  
 #include <cmath> //it is for all math functions library  
 int main() //it is actually a function here  
   {  
    using namespace std;  
    int ages[3] = {21, 19, 9}; //2nd method  
    cout << ages[1] + ages [0] << endl;  
    system("pause");  
    return 0;  
   }   

0 comments

C++ | Beginning of Arrays | Lecture 7

beginning of arrays

Lecture 7:

Today we 'll discuss about Arrays in C++.
Array is a data structure, which allows us to collect same size and type of values in single variable. And if you need to call any specific value within array. You need to call its position. Here you will learn that how can we play will array in C++.

 /*  
  Name: Beginning Concept of Arrays  
  Copyright: Sameearticles.blogspot.com  
  Author: Samee Ullah Feroz  
  Date: 28/02/14 16:08  
  Description: Here you will learn about arrays that what is array?  
 */  
 #include <iostream>  
 #include <cmath> //it is for all math functions library  
 int main() //it is actually a function here  
   {  
    using namespace std;  
    int ages[3];  
    ages [0]=21;  
    ages [1] = 19;  
    ages[2] = 9;  
   cout << ages[1] + ages [0] << endl;  
    system("pause");  
    return 0;  
   }   
0 comments

C++ | Return Value in Function | Lecture 6

return value in function

Lecture # 6:

Here you will learn that how to return value in function in C++ programming?
It is a very useful way and important way. You will use it in your programming many times. It works with user define functions. Let's try it.
Here we take dog year example.

 /*  
  Name: Return Value in functions  
  Copyright: SameeArticles.blogspot.com  
  Author: Samee Ullah Feroz  
  Date: 24/02/14 16:17  
  Description: How to return value in function in C++?  
 */  
 #include <iostream>  
 #include <cmath> //it is for all math functions library  
 int dogyears(int); //it is int function and return int   
 int main() //it is actually a function here  
   {  
    using namespace std;  
    int years; // user define variable  
    cout << "enter your dogs age: ";  
    cin >> years;  
    int peopleyears = dogyears(years);  
    cout << "your dog is " << peopleyears << endl;  
    system("pause");  
    return 0;  
   }   
 int dogyears(int dog) //User define function.  
 {  
   return 7 * dog; //it will return a value a variable  
 }  
0 comments
 
Copyright © 2011-2026. Samee Articles - All Rights Reserved
Proudly powered by Blogger