Poslao: 29 Okt 2009 16:43
|
offline
- zend
- Počasni građanin
- Pridružio: 22 Okt 2009
- Poruke: 900
- Gde živiš: Pancevo
|
Uradio sam Kontakt formu u html sa phpom nikada nisam radio i nabavio sam skriptu ali ne znam kako sta treba da izmenim da bi se podaci poslali???Koristim EASY PHP server neznam da li i tu mora nesto da se podesi.googlao sam ali nisam nasao bas to sto meni treba.
Nasao sam ovde na forumu ovu temu meni ona bas nije jasna opet neradi.
Ovo je kod koji sam ja koristio pa mozda ima gresaka pogledajte....
<<<<<<<<<<<<<<HTML>>>>>>>>>>
<html>
<head>
<title> Kontakt forma</title>
</head>
<body>
<form action="Sendemail.php" method="post">
Ime i prezime: <input type="text" name="value0" value=""><br>
E - mail adresa: <input type="text" name="value1" value=""><br>
Naslov poruke: <input type="text" name="value2" value=""><br>
Tekst poruke: <textarea name="value3" cols="10" rows="3"></textarea><br><br>
<input type="submit" value="Posalji" name="posalji">
</form>
</body>
</html>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<PHP>>>>>>>>>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>
<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
die ("Go back! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
die ("Use back! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("YourEmail", $subject, $message, $from);
?>
<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />
Attention: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>
<br /><br />
<a href="contact.php"> Next Page </a>
</p>
</body>
</html>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
PHP sam sacuvao .php ekstenzijom a zelim da posaljem poruku na office.stojmenovic@gmail.com
kad hocu da posaljem on izbaci ovo
|
|
|
Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
|
|
Poslao: 29 Okt 2009 17:37
|
offline
- MSMarkoN
- Ugledni građanin
- Pridružio: 15 Maj 2006
- Poruke: 333
- Gde živiš: Babušnica
|
Proveri imas li negde sendeail.php posto vidim da nedostaje m ili se tako zove.
|
|
|
|
|
Poslao: 26 Nov 2009 16:30
|
offline
- Gawrey
- Novi MyCity građanin
- Pridružio: 12 Nov 2009
- Poruke: 15
|
Napisano: 26 Nov 2009 16:27
Evo uradio sam jednu kontakt formu za tebe... Upisi svoj e-mail na mesto Tvoj E-mail u fajlu slanje.php podebljao sam ti...
Napravi fajl kontakt.php i ubaci ovaj kod unutra
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kontakt forma </title>
</head>
<body>
<form method="post" action="slanje.php">
<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
Tvoje Ime: <br />
<input type="text" name="visitor" size="35" />
<br />
Tvoj Email:<br />
<input type="text" name="visitormail" size="35" />
<br />
<br />
Poruka:
<br />
<textarea name="notes" rows="4" cols="40"></textarea>
<br />
<input type="submit" value="Posalji" />
<br />
</form>
</body>
</html>
zatim napravi fajl slanje.php i ubaci ovaj kod unutra:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kontakt</title>
</head>
<body>
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
if (eregi('http:', $notes)) {
die ("Zabranjeno reklamiranje sajtova! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Tvoja e-mail adresa je netacna</h2>\n";
$badinput = "<h2>Poruka nije poslata</h2>\n";
echo $badinput;
die ("Nazad! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Niste popunili sva polja</h2>\n";
die ("Nazad! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("[b]Tvoj E-mail[/b]", $subject, $message, $from);
?>
<p align="center">
Datum: <?php echo $todayis ?>
<br />
Hvala vam: <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />
Poruka:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>
<br /><br />
<a href="kontakt.php"> Povratak na Kontakt </a>
</p>
</body>
</html>
to je to... Pozz
Dopuna: 26 Nov 2009 16:30
Evo ti i fajlovi da se ne mucis...
|
|
|
|
|
Poslao: 27 Nov 2009 08:09
|
offline
- zend
- Počasni građanin
- Pridružio: 22 Okt 2009
- Poruke: 900
- Gde živiš: Pancevo
|
sredio sam to odavno i radi ko blesavo
|
|
|
|