Skip to content

Instantly share code, notes, and snippets.

@kirwebpr
kirwebpr / db_connect.php
Created January 6, 2017 19:06
Форма регистрации и авторизации + RedBeanPHP
<?php
require "libs/rb.php";
R::setup( 'mysql:host=localhost;dbname=test_zadanie',
'root', '' );
session_start();
?>
@kirwebpr
kirwebpr / form.php
Created January 5, 2017 11:38
Форма обратной связи
<?php
session_start();
if(isset($_POST["send"])){
$from = htmlspecialchars ($_POST["from"]);
$to = htmlspecialchars ($_POST["to"]);
$subject = htmlspecialchars ($_POST["subject"]);
$message = htmlspecialchars ($_POST["message"]);
$_SESSION["from"] = $from;
$_SESSION["to"] = $to;
$_SESSION["subject"] = $subject;