A
A
Anton-Pluton2018-04-25 21:58:38
PHP
Anton-Pluton, 2018-04-25 21:58:38

Why is the error Function name must be a string ???

Swears at this line, what's the problem ???

$result = mysqli_query($connection,"SELECT * FROM cart,adidas WHERE cart.cart_ip = '{$_SERVER('REMOTE_ADDR')}' AND adidas.id = cart.cart_id_products");

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2018-04-25
@Anton-Pluton

$_SERVER('REMOTE_ADDR') -> $_SERVER['REMOTE_ADDR']

M
Melkij, 2018-04-25
@melkij

$_SERVER('REMOTE_ADDR')

You are trying to call a function. And $_SERVER is not a function and not something castable to a callable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question