Kontakt forma

Bok,

imam sljedece:

HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

 <HEAD>

  <TITLE>Studio 30 - Send message</TITLE>

  <META NAME="Keywords" CONTENT="form, divs">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


  <META NAME="Description" CONTENT="A CSS Tableless Ajax Contact Form">



<!-- JQuery -->

<script type="text/javascript" src="jquery-1.2.6.min.js"></script>



 <script type="text/javascript">                                         

   // we will add our javascript code here           

   

$(document).ready(function(){

$("#ajax-contact-form").submit(function(){



var str = $(this).serialize();



   $.ajax({

   type: "POST",

   url: "contact.php",

   data: str,

   success: function(msg){

    

$("#note").ajaxComplete(function(event, request, settings){



if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form

{

result = '<div class="notification_ok">Your message has been sent. Thank you! 


<a href="javascript: self.close ()" mce_href="javascript: self.close ()">Close window</a><br mce_bogus="1"></p></div>';

$("#fields").hide();

}

else

{

result = msg;

}



$(this).html(result);



});



}



 });



return false;



});



});



 </script>  

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 

<link rel="stylesheet" type="text/css" href="style.css" />



</HEAD>



 <BODY>

 

 [align=center]



[align=center]<h3>&nbsp;</h3>[/align]

<div align="left" style="width: 500px;">

  <fieldset class="info_fieldset">

<legend>Contact



</legend><div id="note"></div>

<div id="fields">



<form id="ajax-contact-form" action="javascript:alert('success!');">

<label>Name</label>
<textarea name="name" cols="40" rows="1" class="textbox"></textarea>





<label>E-Mail</label>
<textarea name="email" cols="40" rows="1" class="textbox"></textarea>







<label>Message</label><TEXTAREA class="textbox" NAME="message" ROWS="10" COLS="40"></TEXTAREA>




<label>&nbsp;</label><INPUT class="button" type="submit" name="submit" value="Send Message">

</form>

</div>



</fieldset>



</div>



 [/align]

 

 </BODY>

</HTML>

PHP

<?php

/*

Credits: Bit Repository

URL: http://www.bitrepository.com/

*/



include 'config.php';



error_reporting (E_ALL ^ E_NOTICE);



$post = (!empty($_POST)) ? true : false;



if($post)

{

include 'functions.php';



$name = stripslashes($_POST['name']);

$email = trim($_POST['email']);

$subject = "Studio 30 - Upit sa stranice";

$message = stripslashes($_POST['message']);





$error = '';



// Check name



if(!$name)

{

$error .= 'Please enter your name.
';

}



// Check email



if(!$email)

{

$error .= 'Please enter an e-mail address.
';

}



if($email && !ValidateEmail($email))

{

$error .= 'Please enter a valid e-mail address.
';

}



// Check message (length)



if(!$message || strlen($message) < 10)

{

$error .= "Please enter your message. It should have at least 10 characters.
";

}





if(!$error)

{

$mail = mail(WEBMASTER_EMAIL, $subject, $message,

     "From: ".$name." <".$email.">\r\n"

    ."Reply-To: ".$email."\r\n"

    ."X-Mailer: PHP/" . phpversion());





if($mail)

{

echo 'OK';

}



}

else

{

echo '<div class="notification_error">'.$error.'</div>';

}



}

?>

imam jos par fajlova ali mislim da su nebitni…

Uglavnom imam frke kad netko upise njemacka slova…u e-malu stizu samo ???

Unaprijed hvala na pomoci,

Pozzz

U kojem encodingu ti stiže mail?
Ako nije utf-8, probaj tamo gdje definiraš header maila dodati:

Content-Type: text/plain; charset=utf-8

Bok,

hvala na pomoci…probavao sam i to…samo neznam dali sam tocno ubacio na mjesto gdje treba…dali mi mozes napisat gdje bi to trebalo ubacit…hvala…pozdrav

…sredio sam…ipak hvala :wink:


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Webmaster.Ninja