[advanced search]
Results from the most recent live auction are here.
23 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Domain Name Industry Newsletter
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 04-06-2006, 07:30 PM   · #1
def1
Senior Member
 
def1's Avatar
 
Trader Rating: (16)
Join Date: May 2005
Posts: 1,536
NP$: 293.00 (Donate)
def1 has a spectacular aura aboutdef1 has a spectacular aura about
Form help.

I've got this form, www.bumrecords.net/templates/advertise1.php

but I dont know how to send it to my email. Can someone please help me. I just need that form to send to my email.


Please register or log-in into NamePros to hide ads
__________________
Did you try my toolbar? Works in Firefox and IE!
http://www.bumrecords.net - Fun Games, Music, Discussion, And Much More!
upload˛
•Pick the Web Hosting Company most NamePros Members Use Pick Chronichosting!•
def1 is offline   Reply With Quote
Old 04-06-2006, 07:53 PM   · #2
nasaboy007
NamePros Regular
 
Location: mysitememberships.com
Trader Rating: (32)
Join Date: Jul 2005
Posts: 925
NP$: 4800.90 (Donate)
nasaboy007 is a splendid one to beholdnasaboy007 is a splendid one to beholdnasaboy007 is a splendid one to beholdnasaboy007 is a splendid one to beholdnasaboy007 is a splendid one to beholdnasaboy007 is a splendid one to beholdnasaboy007 is a splendid one to behold
well for one thing, ur gonna have to rename those "checkboxes"... they all are named "checkbox".

after that, simply use the $_POST variables from php to format ur message into one variable, make the $_POST['email'] (or w/e) into the sending email address and use the mail() function of php. http://www.php.net/mail
__________________
nasaboy007 is offline   Reply With Quote
Old 04-06-2006, 08:17 PM   · #3
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 


Name: Eric
Location: Kentucky
Trader Rating: (142)
Join Date: Mar 2005
Posts: 4,268
NP$: 1152.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
This should work:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title>Bum Records - Advertise</title>
<
style type="text/css">
img{filter:none;}
a:hover img{-moz-opacity: 0.85;
filter:gray;}
</
style>
<
style type="text/css">
<!--
body,td,th {
    
font-family: Arial, Helvetica, sans-serif;
    
font-size: 12px;
    
color: 000000;
}
body {
    
background-color: #333333;
    
margin-left: 0px;
    
margin-top: 0px;
    
margin-right: 0px;
    
margin-bottom: 0px;
}
a:link {
    
color: #CCCCCC;
    
text-decoration: underline;
}
a:visited {
    
text-decoration: underline;
    
color: #CCCCCC;
}
a:hover {
    
text-decoration: none;
    
color: 993300;
}
a:active {
    
text-decoration: underline;
    
color: #CCCCCC;
}
.
style2 {font-size: 18px}
.
style3 {font-size: 12px; }
.
style5 {color: #FFFFFF}
.style6 {font-size: 12px; font-weight: bold; }
.
style7 {color: #000000}
.style8 {font-size: 12px; font-weight: bold; color: #000000; }
-->
</
style></head>

<
body><center>
<
table width="770" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td><a href="index.html"><img src="images/newst_01.gif" width="250" height="121" border="0" /></a><img src="images/newst_02.gif" width="520" height="121" /></td>

  </
tr>
  <
tr>
    <
td bgcolor="#EEEEEE"><a href="index.html"><img src="images/newst_03.gif" width="63" height="33" border="0" /></a><a href="artists.html"><img src="images/newst_04.gif" width="82" height="33" border="0" /></a><a href="signup.html"><img src="images/newst_05.gif" width="96" height="33" border="0" /></a><a href="messageboard/"><img src="images/newst_06.gif" width="127" height="33" border="0" /></a><img src="images/newst_07.gif" width="402" height="33" /></td>
  </
tr>
</
table>
<
table bgcolor="#EEEEEE" width="770" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td align="left" valign="top"><div class="style2" style="padding-left:5px;">
      <
p><u>Advertise </u></p>

      <
p class="style3">If you would like to advertise with us please fill out the form below.</p>
      <
div style="border-width:3px; border-style:solid; color:#666666; background-color:#999999; width:500px; padding-left:5px; padding-top:3px;"><form name="form1" id="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        <
p class="style3 style7"><strong>What type of advertisement are you interested in?</strong></p>
        
        <!--
Ad Types -->
        <
p class="style7">
          <
input type="checkbox" name="ad_type" value="Frontpage" />
          <
span class="style3">Frontpage</span></p>
        <
p class="style7">
          <
input name="ad_type" type="checkbox" class="style3" value="Banner" />
          <
span class="style3">Banner</span></p>

        <
p class="style7">
          <
input type="checkbox" name="ad_type" value="Custom" />
          <
span class="style3">Custom</span> </p>
        <!-- /
Ad Types -->
        
        <!--
Company -->
        <
p class="style8">What type of company are you? </p>
          <
p class="style7">
              <
input name="company_type" type="radio" class="style3" value="Musician" />
              <
span class="style3">Musician</span> </p>

          <
p class="style7">
            <
input name="company_type" type="radio" class="style3" value="Label" />
            <
span class="style3">Label </span></p>
          <
p class="style7">
            <
input name="company_type" type="radio" value="Ad agency" />
            <
span class="style3">Advertising Agency </span></p>
          <
p class="style7">
            <
input name="company_type" type="radio" value="Not listed" />
            <
span class="style3">Company type not listed</span></p>
        <!-- /
Company -->
        
        <!--
Online Advertising Before? -->
          <
p class="style8"> Have you ever advertised online before?</p>
            <
p class="style7">
              <
input name="advertised_before" type="radio" value="Yes" />
              <
span class="style3">Yes</span>              <input name="advertised_before" type="radio" value="No" />
              <
span class="style3">No</span></p>
        <!-- /
Online Advertising Before? -->
        
        <!--
Name, Email, Description -->
            <
p class="style8"> First Name</p>

            <
p class="style8">
              <
input name="first_name" type="text" value="" />
</
p>
            <
p class="style8">Last Name</p>
            <
p class="style8">
              <
input type="text" name="last_name" />
            </
p>
            <
p class="style8">Email</p>
            <
p class="style8">

              <
input type="text" name="email" />
</
p>
            <
p class="style8">Brief Company Description</p>
            <
p class="style6">
              <
textarea name="company_descr" cols="50"></textarea>
</
p>

        <!-- /
Name, Email, Description -->
            <
p class="style6">
              <
input type="submit" name="Submit" value="Send" />
              <
input type="reset" name="Reset" value="Reset" />

            </
p>
      </
form>
      <?
php

      
if(isset($_POST['Submit']) && $_POST['Submit'] != '')
      {
        
$ad_type = trim(strip_tags($_POST['ad_type']));
        
$company_type = trim(strip_tags($_POST['company_type']));
        
$advertised_before = trim(strip_tags($_POST['advertised_before']));
        
$first_name = trim(strip_tags($_POST['first_name']));
        
$last_name = trim(strip_tags($_POST['last_name']));
        
$email = trim(strip_tags($_POST['sender_email']));
        
$message = wordwrap(trim(strip_tags($_POST['company_descr'])), 70, "<br>\n");
        
$ip = (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];

        if(!
preg_match("/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $email))
        {
          echo
'<br>E-mail is either invalid or left blank. Please check it and try again.';
        }
        else
        {
          
$e = $email;

          if(empty(
$ad_type) || empty($company_type) || empty($advertised_before) || empty($first_name) || empty($last_name) || empty($message))
          {
            echo
'<br>One or more required fields left blank.';
          }
          else
          {
            
$headers  = 'MIME-Version: 1.0'."\r\n";
            
$headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
            
$headers .= 'From: '.$first_name.' <'.$e.'>';

            
$send = mail("you@domain.com", "Advertising on Bum Records", "
            <html>
            <head>
            <title>Email from $first_name - About Advertising</title>
            </head>

            <body>

            <table>
            <tr>
              <td colspan=\"2\">Someone is interested in advertising on Bum Records!</td>
            </tr>
            <tr>
              <td><b>First Name:</b></td>
              <td>$first_name</td>
            </tr>
            <tr>
              <td><b>Last Name:</b></td>
              <td>$last_name</td>
            </tr>
            <tr>
              <td><b>Email:</b></td>
              <td>$e</td>
            </tr>
            <tr>
              <td><b>IP:</b></td>
              <td>$ip</td>
            </tr>
            <tr>
              <td><b>Ad Type:</b></td>
              <td>$ad_type</td>
            </tr>
            <tr>
              <td><b>Company Type:</b></td>
              <td>$company_type</td>
            </tr>
            <tr>
              <td><b>Advertised online before?</b></td>
              <td>$advertised_before</td>
            </tr>
            <tr>
              <td valign=\"top\"><b>Company Description:</b></td>
              <td>$company_descr</td>
            </tr>
            </table>

            </body>
            </html>"
, $headers);
          }
          if(
$send)
          {
            echo
'<br>Thank you, '.$name.', for enquiring about advertising on Bum Records.';
          }
          else
          {
            echo
'<br>Seems to have been a problem sending the email. Please try again.';
          }
        }
      }
      
?>
      </div>
      <p class="style3">&nbsp;</p>
      <p class="style3"></p>
    </div></td>
    <td width="180px" align="left" valign="top"><p><script type="text/javascript"><!--
google_ad_client = "pub-2704045946477637";
google_alternate_color = "eeeeee";
google_ad_width = 180;
google_ad_height = 90;
google_ad_format = "180x90_0ads_al";
google_ad_channel ="";
google_color_border = "B4D0DC";
google_color_bg = "ECF8FF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "6F6F6F";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
  </tr>

</table>
<div class="style5" style="background-color:333333; text-align:left">Bum Records &copy; 2005 -<span class="style5"> <a href="index.html">Home</a> - <a href="artists.html">Artists</a> - <a href="signup.html">Sign Up</a> - <a href="messageboard.html">Message Board</a> - <a href="advertise.html">Advertise</a> </span></div>

</center></body>
</html>


Just replace "you@domain.com" with your email.
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.3 now available!!
SecondVersion is offline   Reply With Quote
Old 04-07-2006, 05:20 PM   · #4
def1
Senior Member
 
def1's Avatar
 
Trader Rating: (16)
Join Date: May 2005
Posts: 1,536
NP$: 293.00 (Donate)
def1 has a spectacular aura aboutdef1 has a spectacular aura about
thanks guys!
__________________
Did you try my toolbar? Works in Firefox and IE!
http://www.bumrecords.net - Fun Games, Music, Discussion, And Much More!
upload˛
•Pick the Web Hosting Company most NamePros Members Use Pick Chronichosting!•
def1 is offline   Reply With Quote
Old 04-07-2006, 07:33 PM   · #5
SecondVersion
while ($awake){ code(); }
 
SecondVersion's Avatar
 


Name: Eric
Location: Kentucky
Trader Rating: (142)
Join Date: Mar 2005
Posts: 4,268
NP$: 1152.00 (Donate)
SecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond reputeSecondVersion has a reputation beyond repute
Member of the Month
MOTM September 2005 Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Cancer Alzheimer's Protect Our Planet
No problem.
__________________

SecondVersion.com - The Personal Blog of SecondVersion
Domain Name Portfolio - Get your free copy. - Version 1.0.3 now available!!
SecondVersion is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Proof is in the Parking Hunting Moon Proof is in the Parking
Advertise your business at NamePros
All times are GMT -7. The time now is 09:32 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0