navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Another line or a new mailing.php ?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Another line or a new mailing.php ?
Page: [1]
 
perfectgreeneyes

 

Posts: 1
Joined: 8/26/2005
Status: offline

 
Another line or a new mailing.php ? - 8/26/2005 9:34:05   
hi everybody.
i need some help here please. i always design first my forms in frontpage and after i bind them to my php file. now in this case i have designed two forms. a simple one with 3 boxes:
NAME
EMAIL
SUGGESTION
i have wrote the mailing.php for it like this:
-----------------
<?php

// your email address
$youremail = "adminatbicestertown.co.uk";
// field validation
if ($email=="" || $comments=="" || $name=="")
{
print ("All fields are required! Please go back and try again.");
}
else {
// email validation
if(!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) {
print ("Your email address does not appear to be valid. Please go back and try again.");
exit;
}
// send email
$headers = "From: \"$name\" <$email>\n";
$subject = "Feedback Form";
$message = "$comments";
mail ("$youremail", "$subject", $message, $headers);
print ("Thank you $name, your email has been sent to Bicester Town.");
}
?>
---------------------

The second form it's same like above form but contains a few more fields(boxes)

BUSINESS NAME
CONTACT PERSON
PHONE
EMAIL
WEB
DETAILS

i have not made the php yet for this one as i have a few questions before.

1) Can i use the above php code for the same job? if yes, what do i have to do? To add a few more fields? Or i have to design a new php file with a different name?

thank you very much for your time and understanding.
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Another line or a new mailing.php ?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts