Answer the question
In order to leave comments, you need to log in
How to set up an entry in the database after paying through Yandex?
There is a site with https protocol, and configured https notifications, payment is made through custom. There is a handler file.
<?
$secret_key = '';
$post_str = $_POST['notification_type'] . '&'. $_POST['operation_id']. '&' . $_POST['amount'] . '&643&' . $_POST['datetime'] . '&'. $_POST['sender'] . '&' . $_POST['codepro'] . '&' . $secret_key. '&' . $_POST['need-email'] ;
$sha1 = sha1( $post_str );
if( $sha1 != $_POST['sha1_hash'] )
{
exit;
}
$dbc = mysqli_connect();
$username = $_POST['need-email'] ;
$sql = "INSERT INTO `signup` (username) VALUES ('$username')";
mysqli_query($dbc,$sql);
?>
Answer the question
In order to leave comments, you need to log in
$dbc = mysqli_connect($servername, $username, $password, $database);
$sql = "INSERT INTO signup (username) VALUES ('".$username?$username:'Упс кажется параметр пуст'."')";
if (mysqli_query($conn, $sql)) {
//return
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($dbc);
Doesn't add any data at all, I need to add urlsite, text, ip
<?
$secret_key = '';
$post_str = $_POST['notification_type'] . '&'. $_POST['operation_id']. '&' . $_POST['amount'] . '&643&' . $_POST['datetime'] . '&'. $_POST['sender'] . '&' . $_POST['codepro'] . '&' . $secret_key. '&' . $_POST['need-email'] ;
$sha1 = sha1( $post_str );
if( $sha1 != $_POST['sha1_hash'] )
{
exit;
}
include "admin/config/config.php";
$dbc = mysqli_connect();
$text = $_POST['need-email'] ;
$sql = "
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question