mp3-Bazar A another multimedia engine
 Persian Community Media Persia Media Blog

PHP

FORM

Form Action
action=”<?php echo $_SERVER['PHP_SELF']; ?>”
action=”<?php echo $PHP_SELF ?>”
<form method=”POST” action=”<?php echo $SCRIPT_NAME ?>”>
<html><body>
<form METHOD=”POST” ACTION=”GetFormValue.php”>
Name: <input TYPE=”TEXT” NAME=”Name”/>
Memo: <textarea NAME=”Comment” ROWS=”4″ COLS=”40″ WRAP=”PHYSICAL”> </textarea>
<input TYPE=”SUBMIT”/>

</form></body>
<!– GetFormValue.php –>
<?php echo “Name=$Name”;
echo “Text=$Comment”;
?>


Form based Email

<form action=”sendemail.php” method=post name=form1>
Name: <input name=toname size=35/>
E-mail: <input name=tomail size=35/>
CC: <input name=cc size=35/>
BCC: <input name=bcc size=35/>
<select name=priority>
<option value=1>Highest</option>
<option value=2>High</option>
<option selected value=3>Normal</option>
<option value=4>Low</option>
<option value=5>Lowest</option>
</select>
Subject: <input name=subject size=35/>
Message: <textarea cols=50 name=body rows=7></textarea>
<input name=Submit type=submit value=Submit/>
</form></body></html>

<!– sendemail.php –>
<html><body>
< ?php
$message= ” ” ;
if (empty ( $toname) || empty ( $tomail) ) {
die ( “Recipient is blank! “) ;
}else{ $to = $toname . ” <” . $tomail . “>” ; }
if ( empty ( $subject) ) { $subject=” “; }
if (($priority>0) && ($priority<6)) {
$mailheader = “X-Priority: “. $priority .”\n”;
}
$mailheader.= “From: ” . “Sales Team <sales @yourdomain.com>\n”;
$mailheader.= “X-Sender: ” . “support@yourdomain.com\n”;
$mailheader.= “Return-Path: ” . “support@yourdomain.com\n”;
if (!empty($cc)) { $mailheader.= “Cc: ” . $cc .”\n”;}
if (!empty($bcc)) { $mailheader.= “Bcc: ” . $bcc .”\n”; }
if (empty($body)) { $body=” “; }
$result = mail ($to, $subject, $body, $mailheader);
echo “<b>Mail sent to “. “$to”;
echo $subject;
echo $body;
echo $mailheader;
if ($result) {
echo “<p><b>Email sent successfully!</b></p>”;
}else{ echo “<p><b>Email could not be sent. </b></p>”;}
?>

</b><b>To</b>: < ?php echo $toname . ” [". $tomail . " ]“;?>
<b>CC</b>: < ?php echo $cc;?>
<b>BCC</b>: < ?php echo $bcc; ?>
<b>Priority</b>: < ?php echo $priority;?>
<b>Subject </b>: < ?php echo $subject;?>
<b>Message</b>: < ?php echo $body;?>
</body></html>

Form Based Query
Form Checkbox
Form Data
Form Select
Form TextArea
Form Validation
Hidden Field
Self Call Form
TextBox

3 Responses to “PHP”

  1. Roger Sanjay, 4. March 2009, 16:37
  2. omid, 9. March 2009, 17:35

    سلام من چند مشکل با افزونه
    classified
    دارم


    —-> Let me know?

  3. FITpages, 21. February 2010, 2:36

    FITpages is a Human Edited Web Link Directory which works as a bridge the gap between website surfers and website promoters. In other word, FITpages has been promoting the websites along with description of the site.

    If you have a desire for promoting your business, you can list your own website by listing in FITpages at http://fitpages.net and post your advertisement at FITpages Classifieds at http://classifieds.fitpages.net.

    There are two packages of listing in FITpages
    • Feature Listing
    • Free Listing

    Feature Listing is more effective for web visitors incensement in your website because snapshoot will be displayed on the top of page which creates the extra possibility of surfing your website.

    So, step ahead and get listed your website at FITpages now and see growth of your web traffic.

    So why don’t you waiting?
    List your website on FITpages and post your advertisement on FITpages Classifieds at http://fitpages.net

Post your comment

secret
Enter the letters you see above.

Comment moderation is enabled. Your comment may take some time to appear.