J
J
Jony13372016-01-24 11:16:22
MySQL
Jony1337, 2016-01-24 11:16:22

What do these parts of the code do?

A)

$sql = mysql_query("INSERT INTO `user` (`id`, `profesie`, `img`) 
                        VALUES (' ',' с сюрпризами ',' http ')");

b)
$sql = mysql_query("SELECT `id`, `nume`, `linkimg`, `money`, `time`, `trimite` FROM `utilizator` WHERE `id`= '$userin' ", $link);
    while ($result = mysql_fetch_array($sql)) {
        
        $name1 = $result['nume'];
    $linkimgg = $result['linkimg'];
    $moneyok = $result['money'];
    $timpul = $result['time'];
    $trimiteokk = $result['trimite'];

c)
$sql = mysql_query("SELECT `id`, `time`, `trimite` FROM `utilizator` WHERE `id`= '$utilizatorid' ", $link);
    while ($result = mysql_fetch_array($sql))

what do these pieces of code do

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivanq, 2016-01-24
@Jony1337

1. Inserts a record into the database.
2. Gets the data.
3. Gets the data.
No one will give you more precise explanations without the structure of the database.

R
Rsa97, 2016-01-24
@Rsa97

1. Create incompatibility with PHP 7.0.x
2. B and C add potential for SQL injection

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question