MySQL interesse |
|
De hoster heeft zijn php versie geupdate en nu krijg ik de volgende fout bij mijn contactpagina:
Deprecated: Function ereg() is deprecated in.....
Nu moet de de ereg omgezet worden naar preg_match, maar daar loop ik dus op vast want ben niet echt een php kenner. Dit is zoals het altijd werkte.
$ve = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
$rn = "\r\n";
if( ereg( $ve, $value['email']) ):
$this-> mBody = sprintf( $this->mBody , $value['firstname'], $value['lastname'],$value['telefoonnr'],$value['email'],$value['y_comments'] );
$this->subject = sprintf( $this->subject, $value['firstname'] .' '. $value['lastname']);
$this->mHeader = 'From: '.$value['firstname'] .' '. $value['lastname'].' <'. $value['email'] .'> '.$rn;
$this->mHeader .= 'MIME-Version: 1.0'. $rn;
$this->mHeader .= 'Content-type: text/html; charset=utf-8';
return true;
else:
return false;
endif;
$ve = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$"; $rn = "\r\n"; if( ereg( $ve, $value['email']) ): $this-> mBody = sprintf( $this->mBody , $value['firstname'], $value['lastname'],$value['telefoonnr'],$value['email'],$value['y_comments'] ); $this->subject = sprintf( $this->subject, $value['firstname'] .' '. $value['lastname']); $this->mHeader = 'From: '.$value['firstname'] .' '. $value['lastname'].' <'. $value['email'] .'> '.$rn; $this->mHeader .= 'MIME-Version: 1.0'. $rn; $this->mHeader .= 'Content-type: text/html; charset=utf-8'; return true; else: return false; endif;
Wie kan me op weg helpen?
Alvast bedankt!
|