Jump to content

Draxo

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Draxo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks man, got it working
  2. <form action="kontaktscript.php" method="post"> <fieldset> <label for="name">Namn:</label> <input type="text" name="NAME" id="NAME"/> <label for="name">Tel:</label> <input type="text" name="TEL" id="TEL"/> <label for="email">Email:</label> <input type="text" name="EMAIL" id="EMAIL"/> <label for="MEDDELANDE">Meddelande:</label> <textarea id="MEDDELANDE" name="MEDDELANDE"> </textarea> <input type="submit" value="Skicka" /> </fieldset> </form> <?PHP ###################################################### # # # Forms To Go 4.3.3 # # http://www.bebosoft.com/ # # # ###################################################### error_reporting(E_ERROR | E_WARNING | E_PARSE); ini_set('track_errors', true); function DoStripSlashes($fieldValue) { // temporary fix for PHP6 compatibility - magic quotes deprecated in PHP6 if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) { if (is_array($fieldValue) ) { return array_map('DoStripSlashes', $fieldValue); } else { return trim(stripslashes($fieldValue)); } } else { return $fieldValue; } } function FilterCChars($theString) { return preg_replace('/[\x00-\x1F]/', '', $theString); } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $clientIP = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $clientIP = $_SERVER['REMOTE_ADDR']; } $FTGNAME = DoStripSlashes( $_POST['NAME'] ); $FTGTel = DoStripSlashes( $_POST['TEL'] ); $FTGEmail = DoStripSlashes( $_POST['EMAIL'] ); $FTGMeddelande = DoStripSlashes( $_POST['MEDDELANDE'] ); $validationFailed = false; # Include message in error page and dump it to the browser if ($validationFailed === true) { $errorPage = '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>Error</title></head><body>A <br /><br />A<br /><br />A</body></html>'; $errorPage = str_replace('<!--FIELDVALUE:NAME-->', $FTGNAME, $errorPage); $errorPage = str_replace('<!--FIELDVALUE:TEL:-->', $FTGTEL, $errorPage); $errorPage = str_replace('<!--FIELDVALUE:EMAIL:-->', $FTGEMAIL, $errorPage); $errorPage = str_replace('<!--FIELDVALUE:MEDDELANDE-->', $FTGMEDDELANDE, $errorPage); $errorList = @implode("<br />\n", $FTGErrorMessage); $errorPage = str_replace('<!--VALIDATIONERROR-->', $errorList, $errorPage); echo $errorPage; } if ( $validationFailed === false ) { # Email to Form Owner $emailSubject = FilterCChars("A"); $emailBody = "--FTG_BOUNDRY\n" . "Content-Type: text/plain; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: base64\n" . "\n" . chunk_split( base64_encode( "NAME : $FTGNAME\n" . "TEL : $FTGTEL\n" . "EMAIL : $FTGEEMAIL\n" . "MEDDELANDE : $FTGMEDDELANDE\n" . "-missing field name- : #-missing field name-#\n" . "" ) ) . "\n" . "--FTG_BOUNDRY\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: base64\n" . "\n" . chunk_split( base64_encode( "<html>\n" . "<head>\n" . "<title></title>\n" . "</head>\n" . "<body>\n" . "NAME : $FTGNAME<br />\n" . "TEL : $FTGTEL<br />\n" . "EMAIL : $FTGEMAIL<br />\n" . "MEDDELANDE : $FTGMEDDELANDE<br />\n" . "</body>\n" . "</html>\n" . "" ) ) . "\n" . "--FTG_BOUNDRY--"; $emailTo = 'A <@>'; $emailFrom = FilterCChars("@"); $emailHeader = "From: $emailFrom\n" . "MIME-Version: 1.0\n" . "Content-Type: multipart/alternative; boundary=\"FTG_BOUNDRY\"\n" . "\n"; mail($emailTo, $emailSubject, $emailBody, $emailHeader); # Include message in the success page and dump it to the browser $successPage = '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>Success</title></head><body>A<a href="www/">A</a></body></html>'; $successPage = str_replace('<!--FIELDVALUE:NAME-->', $FTGNAME, $successPage); $successPage = str_replace('<!--FIELDVALUE:TEL-->', $FTGTEL, $successPage); $successPage = str_replace('<!--FIELDVALUE:EMAIL-->', $FTGEMAIL, $successPage); $successPage = str_replace('<!--FIELDVALUE:MEDDELANDE-->', $FTGMEDDELANDE, $successPage); echo $successPage; } ?>
  3. Thanks guys, Have got it to show the name field now, the others are still blank, have transformed all form elements in the html to uppercase as there are too many elements in the php form which make me very confused as to which I would make lowercase otherwise. What could the problem be that makes the other fields blank, all names seem to match up now?
  4. Have left out the actual info about the website, google makes it bad for business if it links to this showing the webmaster doesn't know what he's doing, hopefully there will be enough info anyway. <?PHP ###################################################### # # # Forms To Go 4.3.3 # # http://www.bebosoft.com/ # # # ###################################################### error_reporting(E_ERROR | E_WARNING | E_PARSE); ini_set('track_errors', true); function DoStripSlashes($fieldValue) { // temporary fix for PHP6 compatibility - magic quotes deprecated in PHP6 if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) { if (is_array($fieldValue) ) { return array_map('DoStripSlashes', $fieldValue); } else { return trim(stripslashes($fieldValue)); } } else { return $fieldValue; } } function FilterCChars($theString) { return preg_replace('/[\x00-\x1F]/', '', $theString); } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $clientIP = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $clientIP = $_SERVER['REMOTE_ADDR']; } $FTGNAME = DoStripSlashes( $_POST['NAME'] ); $FTGTel = DoStripSlashes( $_POST['TEL'] ); $FTGEmail = DoStripSlashes( $_POST['EMAIL'] ); $FTGMeddelande = DoStripSlashes( $_POST['MEDDELANDE'] ); $validationFailed = false; # Include message in error page and dump it to the browser if ($validationFailed === true) { $errorPage = '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>Error</title></head><body>A <br /><br />Hälsningar,<br /><br />A</body></html>'; $errorPage = str_replace('<!--FIELDVALUE:NAME-->', $FTGNAME, $errorPage); $errorPage = str_replace('<!--FIELDVALUE:TEL:-->', $FTGTEL, $errorPage); $errorPage = str_replace('<!--FIELDVALUE:EMAIL:-->', $FTGEMAIL, $errorPage); $errorPage = str_replace('<!--FIELDVALUE:MEDDELANDE-->', $FTGMEDDELANDE, $errorPage); $errorList = @implode("<br />\n", $FTGErrorMessage); $errorPage = str_replace('<!--VALIDATIONERROR-->', $errorList, $errorPage); echo $errorPage; } if ( $validationFailed === false ) { # Email to Form Owner $emailSubject = FilterCChars("A"); $emailBody = "--FTG_BOUNDRY\n" . "Content-Type: text/plain; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: base64\n" . "\n" . chunk_split( base64_encode( "NAME : $FTGNAME\n" . "TEL : $FTGTEL\n" . "EMAIL : $FTGEEMAIL\n" . "MEDDELANDE : $FTGMEDDELANDE\n" . "-missing field name- : #-missing field name-#\n" . "" ) ) . "\n" . "--FTG_BOUNDRY\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: base64\n" . "\n" . chunk_split( base64_encode( "<html>\n" . "<head>\n" . "<title></title>\n" . "</head>\n" . "<body>\n" . "NAME : $FTGNAME<br />\n" . "TEL : $FTGTEL<br />\n" . "EMAIL : $FTGEMAIL<br />\n" . "MEDDELANDE : $FTGMEDDELANDE<br />\n" . "</body>\n" . "</html>\n" . "" ) ) . "\n" . "--FTG_BOUNDRY--"; $emailTo = 'Ar <@>'; $emailFrom = FilterCChars("@"); $emailHeader = "From: $emailFrom\n" . "MIME-Version: 1.0\n" . "Content-Type: multipart/alternative; boundary=\"FTG_BOUNDRY\"\n" . "\n"; mail($emailTo, $emailSubject, $emailBody, $emailHeader); # Include message in the success page and dump it to the browser $successPage = '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>Success</title></head><body>A<a href="www/">A</a></body></html>'; $successPage = str_replace('<!--FIELDVALUE:NAME-->', $FTGNAME, $successPage); $successPage = str_replace('<!--FIELDVALUE:TEL-->', $FTGTEL, $successPage); $successPage = str_replace('<!--FIELDVALUE:EMAIL-->', $FTGEMAIL, $successPage); $successPage = str_replace('<!--FIELDVALUE:MEDDELANDE-->', $FTGMEDDELANDE, $successPage); echo $successPage; } ?>
  5. Hi, sorry, the mail is going through, but no info is being added, it just says name, tel, email, message and then the rest is blank.
  6. Hi, I'd be eternally grateful if someone could tell me where I'm going wrong with the coding for the php form. Many thanks, D <form action="kontaktscript.php" method="post"> <fieldset> <label for="name">Namn:</label> <input type="text" name="name" id="name"/> <label for="name">Tel:</label> <input type="text" name="tel" id="telephone"/> <label for="email">Email:</label> <input type="text" name="email" id="email"/> <label for="message">Meddelande:</label> <textarea id="message"></textarea> <input type="submit" value="Skicka" /> </fieldset> </form> 18384_.php
×
×
  • 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.