Jump to content

astheria

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

astheria's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. For some reason I'm getting all error messages showing and the email not sending even when all the information in the fields is not correct.  PHP is not something that I'm familiar with and any help would be appreciated.  Here is my php file: [code]<?php $nasaadresa = "astheria@gmail.com";  //please replace this with your address $mail = $_POST['Email']; $porukaa = $_POST['Message']; $poruka = str_replace("\r", '<br />', $porukaa); //START OF THANKS MESSAGE //you may edit $thanks message. this is a message which displays when user sends mail from your site $thanks = " <blockquote><p>Thank you for your e-mail.</p> <p><span> $poruka </span></p> <p>You will recive a copy of the message at your email address ($mail).<br />I will do my best to respond as soon as possible.</p></blockquote>"; //do not edit nothing below this line  until comment (ME) say so if you don't have skills with PHP //END OF THANKS MESSAGE if($_POST['submitform']) { $Name = $_POST['Name']; $Email = $_POST['Email']; $Message = $_POST['Message']; $require = $_POST['require']; $browser = $HTTP_USER_AGENT; $ip = $_SERVER['REMOTE_ADDR']; $dcheck = explode(",",$require); while(list($check) = each($dcheck)) { if(!$$dcheck[$check]) { $error .= "<span><blockquote><p>You have not filled out the following field(s): <strong>$dcheck[$check]</strong>.</p></blockquote></span>"; } } if ((!ereg(".+\@.+\..+", $Email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $Email))){ $error .= "<span><blockquote><p>E-Mail Error.<br />This e-mail address <strong>$Email</strong> - is not valid.<br />Please enter a valid e-mail address.</p></blockquote></span>"; } if($error) { echo $error; echo '<span><blockquote><p><a href="#" onClick="history.go(-1)">Please try again.</a></p></blockqoute></span>'; } else { //START OF INCOMING MESSAGE (this message goes to your inbox) $message = " Name: $Name: E-mail: $Email Message: $Message ----------------------------- Browser: $browser IP: $ip "; //END OF INCOMING MESSAGE (this message goes to your inbox) $subject = "Message from Astheria.com - Message was sent by $Name"; //subject OF YOUR INBOX MESSAGE sent to you $subject2 = "Email to Astheria.com successful!"; //subject of OUTGOING MESSAGE - edit this //OUTGOING MESSAGE TEXT $message2 = "You have sent a message to Kyle Meyer of Astheria.com: ----------------------------- From: $Name: E-mail: $Email Message: $Message ----------------------------- "; //END OF outgoing MESSAGE mail($nasaadresa,"$subject","$message","From: $Name <$Email>"); mail($Email,"$subject2","$message2","From: <$nasaadresa>"); echo "$thanks"; } } else{ //this is contact form down here, please edit if you know what are you doing... or the contact form may not be working. echo ' <form class="contactform" action="'.$PHP_SELF.'" method="post"> <fieldset>     <input type="hidden" id="require" value="Name,Email,Message" />     <ul>   <li> <label for="Name">Name</label>   </li>   <li>         <input class="textinput" id="Name" size="50" />           </li>   <li>         <label for="Email">E-mail</label>   </li>           <li>         <input class="textinput" id="Email" size="50" />   </li>   <li>         <label for="Message">Message</label>   </li>   <li>         <textarea id="Message" rows="10" cols="50"></textarea>   </li>   <li>         <input class="button" type="submit" value="Send" name="submitform" />         <input class="button" type="reset" value="Reset" name="reset" />   </li> </ul>   </fieldset> </form>'; } ?>[/code]
  2. It's kind of a one page site (don't mind glitches in other browsers besides FF as I haven't really debugged yet) http://www.astheria.com/sneaky.htm
  3. Thank you, as I said, I have relatively no knowledge of php. How would I go about inserting that contact form into an html page then?
  4. PHP is not my forte, and I've been browsing the web looking for an answer to this question.  I'm in need of a contact form for my site and came across a free open-source file that seems to be just the ticket.  However, I'm having trouble getting it to load into my html page, and I'm not sure why.  Here is the snippet of HTML: [code]  <h2>Contact</h2>   <p>Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is it vestige of the vox populi, now vacant, vanished, as the once vital voice of the verisimilitude now venerates what they once vilified. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose vis-à-vis an introduction, and so it is my very good honor to meet you and you may call me V.</p>   <?php include("/phpincludes/contactform.php"); ?>   </div>[/code] And the PHP file (sorry if it's long): [code]<?php $nasaadresa = "astheria@gmail.com";  //please replace this with your address $mail = $_POST['Email']; $porukaa = $_POST['Message']; $poruka = str_replace("\r", '<br />', $porukaa); //START OF THANKS MESSAGE //you may edit $thanks message. this is a message which displays when user sends mail from your site $thanks = " <p align='left'><br> Thank you for your e-mail, this is confirmation that it has been received.<br> #### MESSAGE TEXT #### <br><br> $poruka <br><br> #### END OF MESSAGE #### <br><br> You will recive a copy of the message at your email address ($mail).<br>I will do my best to respond as soon as possible.<br></p>"; //do not edit nothing below this line  until comment (ME) say so if you don't have skills with PHP //END OF THANKS MESSAGE if($_POST['submitform']) { $Name = $_POST['Name']; $Email = $_POST['Email']; $Message = $_POST['Message']; $require = $_POST['require']; $browser = $HTTP_USER_AGENT; $ip = $_SERVER['REMOTE_ADDR']; $dcheck = explode(",",$require); while(list($check) = each($dcheck)) { if(!$$dcheck[$check]) { $error .= "You have not filled this filed(s): <b>$dcheck[$check]</b>.<br>"; } } if ((!ereg(".+\@.+\..+", $Email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $Email))){ $error .= "Wrong e-mail.<br>This e-mail address <b>$Email</b> - is not valid. Please enter correct e-mail address."; } if($error) { echo $error; echo '<br><a href="#" onClick="history.go(-1)">Please try again.</a>'; } else { //START OF INCOMING MESSAGE (this message goes to your inbox) $message = " Name: $Name: E-mail: $Email Message: $Message ----------------------------- Browser: $browser IP: $ip "; //END OF INCOMING MESSAGE (this message goes to your inbox) $subject = "Message from your site.com - Message was sent by $Name"; //subject OF YOUR INBOX MESSAGE sent to you $subject2 = "Email to Astheria.com Successful!"; //subject of OUTGOING MESSAGE - edit this //OUTGOING MESSAGE TEXT $message2 = "You have sent a message to Kyle Meyer of Astheria.com: ----------------------------- From: $Name: E-mail: $Email Message: $Message ----------------------------- "; //END OF outgoing MESSAGE mail($nasaadresa,"$subject","$message","From: $Name <$Email>"); mail($Email,"$subject2","$message2","From: <$nasaadresa>"); echo "$thanks"; } } else{ //this is contact form down here, please edit if you know what are you doing... or the contact form may not be working. echo ' <p>Feel free to get in touch with me, I am always happy to receive feedback or anything else you may have to say.</p><p>Fields marked <em>*</em> are required.</p><br /><br /> <form name="contactform" action="'.$PHP_SELF.'" method="post"> <input type="hidden" name="require" value="Name,Email,Message">   <fieldset>     <ul>   <li>     <label for="name">Name<em>*</em></label>         <input name="Name" size="30">       </li>   <li>         <label for="email">E-mail<em>*</em></label>         <input name="Email" size="30">   </li>   <li>           <label for="message">Message<em>*</em></label>           <textarea name="Message" rows="10" cols="30"></textarea>   </li>   <li>         <input type="submit" value="Send" name="submitform">         <input type="reset" value="Reset" name="reset">   </li> </ul>   </fieldset> </form>'; } ?>[/code]
×
×
  • 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.