S
S
sasmoney2021-09-26 01:00:28
PHP
sasmoney, 2021-09-26 01:00:28

How to write all the data about the visitor to the database?

There is already a part of the code, but when it is used, it is written to the database, in the data field - array or nothing

<?php
// База уже подключена
$insert_sql1 = "INSERT INTO `info_users` (`id`, `info`) 
VALUES ('NULL','$_SERVER');";
mysql_query($insert_sql1);
?>

And since to write the data so that they are written completely and not empty or array

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Damir, 2021-09-26
@sasmoney

$info = print_r($_SERVER, true);
$insert_sql1 = "INSERT INTO `info_users` (`id`, `info`) 
VALUES ('NULL', '$info');";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question