View Single Post
  #1 (permalink)  
Old 07-10-09, 09:07 AM
zodehala zodehala is offline
Wannabe Coder
 
Join Date: Mar 2007
Posts: 191
Thanks: 0
Thanked 0 Times in 0 Posts
when error moving code in array

PHP Code:



if ($_POST) {
    if (!empty(
$_POST['name'])) 
    {
    
//codes
        
echo $_POST['name'].'<br />';
    } else 
        
$eror[]="error message";    
        if (
preg_match('$regex',$_POST['email'])) 
        {
            
// codes 
            
echo $_POST['email'];
        } else 
$eror[]="error message";

when error occured how will we assign mesages into array and automatically wil send array to y.php
Reply With Quote