Note that there are some explanatory texts on larger screens.

plurals
  1. POForm is redirect with method get instead of post
    primarykey
    data
    text
    <p>I have file with name contact.php, inside I have form:</p> <pre><code>&lt;form method="post" name="kontakt" action="send_mail.php"&gt; &lt;fieldset class="formularz_kontaktowy"&gt; &lt;legend&gt;Formularz kontaktowy&lt;/legend&gt; &lt;div&gt;&lt;label id="lblStatus"&gt;&lt;/label&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="text" name="txtName" title="Imię i nazwisko" id="txtName" class="text"&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="text" name="txtEmail" title="Email" id="txtEmail" class="text"&gt;&lt;/div&gt; &lt;div&gt;&lt;input type="text" name="txtTitle" title="Tytuł" id="txtTitle" class="text"&gt;&lt;/div&gt; &lt;div&gt;&lt;textarea cols="30" rows="10" name="txtMessage" id="txtMessage" class="text" title="Treść wiadomości"&gt;&lt;/textarea&gt;&lt;/div&gt; &lt;input type="submit" name="btnSendmail" value=Send"&gt; &lt;/fieldset&gt; &lt;/form&gt; </code></pre> <p>after click btnSendmail in browser i have URL, for example: localhost/contact.php?txtName=Mary+Smith&amp;txtEmail=mailMail%40gmail.com&amp;txtTitle=dfd&amp;txtMessage=fgdf&amp;btnSendmail=Send, but I think it should be localhost/send_mail.php. What is reason for it?</p> <p>EDIT: send_mail.php</p> <pre><code>&lt;?php require_once "Mail.php"; $from = "&lt;mailaddress@gmail.com&gt;"; $to = "&lt;mail2@gmail.com&gt;"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "ssl://smtp.gmail.com"; $port = "465"; $username = "&lt;mailaddress@gmail.com&gt;"; $password = "password"; $headers = array ('From' =&gt; $from, 'To' =&gt; $to, 'Subject' =&gt; $subject); $smtp = Mail::factory('smtp', array ('host' =&gt; $host, 'port' =&gt; $port, 'auth' =&gt; true, 'username' =&gt; $username, 'password' =&gt; $password)); $mail = $smtp-&gt;send($to, $headers, $body); if (PEAR::isError($mail)) { echo("&lt;p&gt;" . $mail-&gt;getMessage() . "&lt;/p&gt;"); } else { echo("&lt;p&gt;Message successfully sent!&lt;/p&gt;"); } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload