Jump to content

please slove


repose

Recommended Posts

Dear sir

 

 

my site  http://repose.in/

 

i up lode  form2mail.php and form2mail.htm

 

for contact form

 

after press the submit button

 

Parse error: syntax error, unexpected '[' in D:\Hosting\5395811\html\reposebeejay\form2mail.php on line 5

 

 

i removing [

 

i given form2mail.htm code here

 

**************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>repose Contact Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<br><Br>
  <p align="center"><b><font color="#414F66" size="2" face="Verdana, Arial, Helvetica, sans-serif">  REPOSE CONTACT FORM</font></b><br>
</p>
<p align="center"><img src="images/logo.jpg" alt="logo" width="252" height="45"><br>
</p>
  <font color="#B9FFE7"></font>
  <form method=POST action=form2mail.php>
  <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
    <tr>
      <td><table width="600" border="0" align="center" cellpadding="3" cellspacing="1">
        <tr bgcolor="#414f66">
          <td colspan="2"><div align="center"><font color="#FFFFFF" size="4" face="Verdana, Arial, Helvetica, sans-serif"><b>Contact form </b> </font></div></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Your name: </font></td>
          <td align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <input name="name" type="text" id="name">
          </font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Your email</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">: </font></td>
          <td align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <input name="email" type="text" id="email">
          </font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Select subject </font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">:</font></td>
          <td align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <select name="subject" id="subject">
              <option>Photography</option>
              <option>Vediography</option>
              <option>Other</option>
              </select>
          </font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">What products have you tried?</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><font size="1"><br>
            *use CTRL to select multiple products</font>          </font></td>
          <td align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <select name="tried_products[]" size="5" multiple>
              <option value="Wedding">Wedding</option>
              <option value="Birthday">Birthday</option>
              <option value="Engagement">Engagement</option>
              <option value="Industrial">Industrial</option>
              <option value="Tabletops">Tabletops</option>
              <option value="None">None</option>
              </select>
</font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">How can we contact you?</font></td>
          <td align="left">
              <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
              <label>
              <input type="radio" name="contact_preference" value="email">
              <font color="#FFFFFF">Email</font></label>
              <br>
              <label>
              <input type="radio" name="contact_preference" value="phone">
              <font color="#FFFFFF">Phone</font></label>
              </font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Did you read our FAQ section? </font></td>
          <td align="left">        
              <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <input name="read_FAQ" type="checkbox" id="read_FAQ" value="yes">
            <font color="#FFFFFF">YES</font></font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Message:</font></td>
          <td align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <textarea name="message" cols="40" rows="6" id="message"></textarea>
          </font></td>
        </tr>
        <tr bgcolor="#414f66">
          <td colspan="2" align="center"><input type="submit" name="Submit" value="Submit"></td>
        </tr>
      </table>
</td></tr></table></form><br>
<p align="center"><img src="images/thank.jpg" alt="logo" width="252" height="45"><br>
</body>
</html>
******************************


here  form2mail.php code


^^^^^^^^^

<?php
# You can use this script to submit your forms or to receive orders by email.
$MailToAddress = "repose@repose.in"; // your email address
$redirectURL = "http://repose.in/index.html; // the URL of the home page
$MailSubject = "[Message from the contact form]"; // the subject of the email

# copyright 2005 Web4Future.com =================================================================================================

# If you are asking for a name and an email address in your form, you can name the input fields "name" and "email".
# If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.

# To block an IP, simply add it to the blockip.txt text file.

# If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
# you must also add "multiple" at the end of the tag like this: <select name="myselectname[]" multiple>
# you have to do the same with checkboxes

# This script was written by George A. & Calin S. from Web4Future.com
# There are no copyrights in the sent emails.

/*****************************************************************

    Web4Future Easiest Form2Mail (GPL).
    Copyright (C) 1998-2005 Web4Future.com All Rights Reserved.
    http://www.Web4Future.com/

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

*****************************************************************/

# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ===================================================
$w4fver =  "2.0.4";
$w4fx = strstr(file_get_contents('blockip.txt'),getenv('REMOTE_ADDR'));

if (preg_match ("/".str_replace("www.", "", $_SERVER["SERVER_NAME"])."/i", $_SERVER["HTTP_REFERER"]) && ($w4fx === FALSE)) {
$w4fMessage = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"></head><body>\n";
if (count($_GET) >0) {
    reset($_GET);
    while(list($key, $val) = each($_GET)) {
        $GLOBALS[$key] = $val;
        if (is_array($val)) {
            $w4fMessage .= "<b>$key:</b> ";
            foreach ($val as $vala) {
                $vala =stripslashes($vala);
                $vala = htmlspecialchars($vala);
                $w4fMessage .= "$vala, ";
            }
            $w4fMessage .= "<br>\n";
        }    
        else {
            $val = stripslashes($val);
            if (($key == "Submit") || ($key == "submit")) { }    
            else {     if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
                    else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
            }
        }
    } // end while
}//end if
else {
    reset($_POST);
    while(list($key, $val) = each($_POST)) {
        $GLOBALS[$key] = $val;
        if (is_array($val)) {
            $w4fMessage .= "<b>$key:</b> ";
            foreach ($val as $vala) {
                $vala =stripslashes($vala);
                $vala = htmlspecialchars($vala);
                $w4fMessage .= "$vala, ";
            }
            $w4fMessage .= "<br>\n";
        }    
        else {
            $val = stripslashes($val);
            if (($key == "Submit") || ($key == "submit")) { }    
            else {     if ($val == "") { $w4fMessage .= "$key: - <br>\n"; }
                    else { $w4fMessage .= "<b>$key:</b> $val<br>\n"; }
            }
        }
    } // end while
    }//end else
$w4fMessage .= "<font size=3D1><br><br>\n Sender IP: ".getenv('REMOTE_ADDR')."</font></font></body></html>";   
   $w4f_what = array("/To:/i", "/Cc:/i", "/Bcc:/i","/Content-Type:/i","/\n/");
    $name = preg_replace($w4f_what, "", $name);
    $email = preg_replace($w4f_what, "", $email);
if (!$email) {$email = $MailToAddress;}
    $mailHeader = "From: $name <$email>\r\n";
    $mailHeader .= "Reply-To: $name <$email>\r\n";
    $mailHeader .= "Message-ID: <". md5(rand()."".time()) ."@". ereg_replace("www.","",$_SERVER["SERVER_NAME"]) .">\r\n";
    $mailHeader .= "MIME-Version: 1.0\r\n";
    $mailHeader .= "Content-Type: multipart/alternative;";           
    $mailHeader .= "     boundary=\"----=_NextPart_000_000E_01C5256B.0AEFE730\"\r\n";                   
    $mailHeader .= "X-Priority: 3\r\n";
    $mailHeader .= "X-Mailer: PHP/" . phpversion()."\r\n";
    $mailHeader .= "X-MimeOLE: Produced By Web4Future Easiest Form2Mail $w4fver\r\n";
    $mailMessage = "This is a multi-part message in MIME format.\r\n\r\n";
    $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";
    $mailMessage .= "Content-Type: text/plain;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";           
    $mailMessage .= strip_tags($w4fMessage)."\r\n\r\n";           
    $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730\r\n";           
    $mailMessage .= "Content-Type: text/html;   charset=\"ISO-8859-1\"\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n";           
    $mailMessage .= "$w4fMessage\r\n\r\n";           
    $mailMessage .= "------=_NextPart_000_000E_01C5256B.0AEFE730--\r\n";           

    if (!mail($MailToAddress, $MailSubject, $mailMessage,$mailHeader)) { echo "Error sending e-mail!";}
    else { header("Location: ".$redirectURL); }   
} else { echo "<center><font face=verdana size=3 color=red><b>ILLEGAL EXECUTION DETECTED!</b></font></center>";}
?>

^^^^^^^^^^^^^^^^^^^^^^

 

 

 

what is problem i dont know ,kindly slove the problem...please

 

Mod edit:

 . . . 

tags added.

 

[attachment deleted by admin]

Link to comment
Share on other sites

Dear sir

 

i changed what u are given

 

after i uplode the php  hit the submit button the message will come

 

 

Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\5395811\html\reposebeejay\form2mail.php on line 134

Error sending e-mail!

 

 

regards

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.