Jump to content

bflosabre91

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bflosabre91's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. for a laptop, go core 2 duo, waaay better on battery life
  2. i never used cookies before and i want to store a specific font size in a cookie when they click a specific button but im not sure how the syntax for doing so would be. <td><a href="javascript:increaseFontSize();"><img src="../images/fontlargersmall.gif" height="24px" align="top" border="0" /></a> </td> that is the code for the button that when it is clicked, i would like to set the cookie. If anyone can give me a clue on how to set the cookie on the click of the link i would really appreciate it. thanks
  3. well i guess more specifically my question is, do i need to use a database of any type to allow for a file attachment or can i still just use SMTP?thanks
  4. i want to alter this code for email to include attachments of txt or doc files. can someone possibly point me in the direction on how to do this? <?php include('includes/header.php'); ?> <div id="body"> <form method="post" action="sendmail.php"> <table id="emailform" align="center"> <tr> <td>First Name: </td> <td><input name="firstName" type="text"/></td> </tr> <tr> <td>Last Name: </td> <td><input name="lastName" type="text"/></td> </tr> <tr> <td>Email: </td> <td><input name="email" type="text"<br /></td> </tr> <tr> <td valign="top">Message:</td> <td><textarea name="message" rows="15" cols="50"></textarea><br /> <input type="submit" value="Submit" /></td> </tr> </table> </form> </div><!--ending div id= body--> <?php include('includes/footer.php'); ?> <?php /*Here we are going to declare the variables*/ $firstName = $_POST['firstName']; $lastName = $_POST['lastName']; $email = $_POST['email']; $message = $_POST['message']; //Save visitor name and entered message into one variable: $formcontent="VISITOR NAME: $firstName $lastName\n\nMessage: $message"; $recipient = "bflosarbe91@yahoo.com"; $subject = "Contact Form"; $mailheader = "From: $email\r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!"); echo "Thank You!"; ?> <?php header( 'Location: mailconfirm.php' ) ; ?> thanks to anyone with any information
  5. im an idiot, had to restart the server and all is well. just a fyi
  6. i always have a separate functions file. it just seems easier to add a new function or when u want to reference a function, you will know exactly where they are. idk if it actually is faster or not though.....
  7. thanks, i fixed the php.ini file now and it sends the email where it should be but it takes a long time and displays this error i dont understand it because the mail that was sent is exactly what it should be but it still displays this error. thanks colby
  8. I'm trying to create a simple email form where it automatically sends a quick message a user inputs to a hardcoded email address. the form i use looks like this: <html> <div id="body"> <form method="post" action="sendmail.php"> <table id="emailform"> <tr> <td>First Name: </td> <td><input name="firstName" type="text"/></td> </tr> <tr> <td>Last Name: </td> <td><input name="lastName" type="text"/></td> </tr> <tr> <td>Email: </td> <td><input name="email" type="text" /><br /></td> </tr> <tr> <td valign="top">Message:</td> <td><textarea name="message" rows="10" cols="40"> </textarea> <br /> <input type="submit" /></td> </tr> </table> </form> </div><!--ending div id= body--> </html> and the actual mail sending code is this: <?php /*Here we are going to declare the variables*/ $firstName = $_POST['firstName']; $lasName = $_POST['lastName']; $email = $_POST['email']; $message = $_POST['message']; //Save visitor name and entered message into one variable: $formcontent="VISITOR NAME: $firstName\n$lastName\nFEEDBACK: $message"; $recipient = "bflosabre91@yahoo.com"; $subject = "Contact Form"; $mailheader = "From: $email\r\n"; $mailheader .= "Reply-To: $email\r\n"; $mailheader .= "MIME-Version: 1.0\r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!"); echo "Thank You!"; ?> and this is the error i get "Failure!PHP Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\Template\sendmail.php on line 13" Any help I would really appreciate. Thanks Colby
×
×
  • 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.