
Mam nadzieje, ze wytłumaczyłem to w miarę zrozumiale.
Adres formularza do edycji: http://elbis.pl/formularz.php
<?php
if (count($_POST))
{
////////// USTAWIENIA //////////
$email = 'info@elbis.pl';
$subject = 'Zamówienie';
$message = '<center><b>Dziękujemy za wysłanie zamówienia</b></center> <center><a href="index.php"><b>Powrót</b></a></center>'; /
$error = 'Wystąpił błąd podczas wysyłania formularza';
$charset = 'iso-8859-2';
//////////////////////////////
$head =
"From: \"Formularz kontaktowy na stronie www.elbis.pl\" <formularz@elbis.pl>\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/plain; charset=$charset\r\n" .
"Content-Transfer-Encoding: 8bit";
$body = '';
foreach ($_POST as $name => $value)
if (!empty($value))
$body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
$smtp_config['use_smtp'] = 1;
$smtp_config['host'] = "mail.vebox.pl";
$smtp_config['myhostname'] = "www.elbis.pl";
$smtp_config['port'] = 25;
$smtp_config['smtp_auth'] = 1; autoryzacja //$smtp_config['user']
$smtp_config['user'] = "formularz@elbis.pl";
$smtp_config['pass'] = "*******;
//$smtp_config['pass']
//$smtp_config['use_smtp'] - jak nie ustawiona to funkcja wrapuje mail()
//$smtp_config['smtp_auth'] - jak ustawiona to jedziemy przez SMTP z autoryzacja
require_once("tools/smtp.php");
echo smtpmail($smtp_config, $email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
}
else
{
?>
session_start();
$smtp_config['use_smtp'] = 1;
echo smtpmail($smtp_config, $email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
$body .= "$name=" . (get_magic_quotes_gpc() ? stripslashes($value) : $value) . "\r\n";
echo $body
$_SESSION['body'] = $body
<form method="POST" action="CZESC 2 SKRYPTU.PHP">
<input type="submit" value="Wyślij Zamówienie">
</form>
echo smtpmail($smtp_config, $email, "=?$charset?B?" . base64_encode($subject) . "?=", $body, $head) ? $message : $error;
echo smtpmail($smtp_config, $email, "=?$charset?B?" . base64_encode($subject) . "?=", $_SESSION['body'], $head) ? $message : $error;
Parse error: syntax error, unexpected $end in /home/u0012/www/send.php on line 57
Powróć do Grafika & Webmastering
Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 1 gość