# PHP Help!

**URL:** https://forum.kirupa.com/t/php-help/168626
**Category:** Uncategorized
**Created:** [November 8, 2005, 9:30pm UTC](https://forum.kirupa.com/t/php-help/168626 "2005-11-08T21:30:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![VersusMG](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@VersusMG](https://forum.kirupa.com/u/VersusMG)
#### Post date: [November 8, 2005, 9:30pm UTC](https://forum.kirupa.com/t/php-help/168626/1 "2005-11-08T21:30:07Z")

</div>

Hi,

I have a PHP based email from on a clients site, it puts the information from the form in a variable and sends, whoever is designated, an email. What I want to have is in the email it sends to have a link that says, “Click here to add this contact to you Outlook Address Book!”

A. Is this possible?  
B. Can someone help me do it?

Here is the code I have so far:

```php
 
<?php 
include("global.inc.php"); 
$errors=0; 
$error="The following errors occured while processing your form input.<ul>"; 
pt_register('POST','name'); 
pt_register('POST','address1'); 
pt_register('POST','address2'); 
pt_register('POST','city'); 
pt_register('POST','state'); 
pt_register('POST','zip'); 
pt_register('POST','phone'); 
pt_register('POST','email'); 
pt_register('POST','comments'); 
if($name=="" || $email=="" ){ 
$errors=1; 
$error.="<li>You did not enter one or more of the required fields. Please go back and try again."; 
} 
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)){ 
$error.="<li>Invalid email address entered"; 
$errors=1; 
} 
if($errors==1) echo $error; 
else{ 
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/")); 
$message= "Name: ".$name." 
Address Line 1: ".$address1." 
Address Line 2: ".$address2." 
City: ".$city." 
State: ".$state." 
Zip: ".$zip." 
Phone: ".$phone." 
Email Address: ".$email." 
Comments: ".$comments." 
"; 
$message = stripslashes($message); 
mail("seth@sethaldridge.com","From: www.alexsandrapappas.com",$message,"You have received a message from www.alexsandrapappas.com. Please read and reply to the message at your earliest convenience."); 
 
$to_put=""; 
$to_put .= $name."|".$address."|".$city."|".$state."|".$zip."|".$phone."|".$email."|".$service." 
"; 
 
header("Refresh: 0;url=http://www.alexsandrapappas.com/thank_you.html"); 
} 
?> 

```
