Jump to content
php.lv forumi

problem ar kontakt formu


realfun

Recommended Posts

esmu sastadijis kontakt formas skriptu vis itka normali be problema tada ka vins nenosuta uz epastu!

 

Pirmais kods

kforma.html

 

<html>

<head>

<title>PM</title>

<head>

<body>

<form action="kphp.php" method="post">

Vārds:<br /> <input type="text" name="vards" /> <br />

E-pasts:<br /> <input type="text" name="epasts" /> <br />

Vestule:<br /> <textarea row="10" cols="20" name="vestule"></textarea> <br />

<input type="submit" value="Sutit" />

 

</form>

</body>

 

Otrais kods

kphp.php

 

<?php

 

$name = $_POST['vards'];

$email = $_POST['epasts'];

$text = $_POST['vestule'];

 

// Kam,Iemesls,Vestule,Galva

mail('tavsniks@epasts.com', 'Problemas', $text, 'From: ' . $name . ' <' . $email . '>');

 

header('Location: knosutits.html');

?>

 

kads nevar ludzu pastities kas par vainu!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...