An error occurs, and I can not understand what the reason is, I tried everything like.

Parse error: syntax error, unexpected '`' in page.php on line 8

<?php header("Access-Control-Allow-Origin: *"); $id = $_POST['id']; $link = mysqli_connect("host", "user_name", "pass"); mysqli_select_db($link,"base_name"); $result = mysqli_query(SELECT * FROM `space` WHERE 'id'=$id); mysqli_close($link); ?> 

Closed due to the fact that off-topic participants Aleksey Shimansky , VenZell , zRrr , user194374, aleksandr barakin 9 Jun '16 at 14:22 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Alexey Shimansky, VenZell, zRrr, Community Spirit, aleksandr barakin
If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    Error in the absence of quotes apparently:

     $result = mysqli_query($link,"SELECT * FROM `space` WHERE id=".$id); 
    • Warning: mysqli_query () expects at least 2 parameters, 1 given in page.php on line 8 corrected for your version, now an error of this kind - SloGS
    • @SloGS and you read what is written in the warning and read the description of the function mysqli_query .... - Alexey Shimansky
    • I apologize, I did not see other errors at the beginning. Copied from the topic. - AkaInq pm
    • @ Alexey Shimansky, I read, it was written that the symbol was missing, but I did not understand where, now I learned, thanks! - SloGS
    • @SloGS is not a symbol but a parameter ...... what means they did not understand where? The documentation clearly states mysqli_query ( mysqli $link , string $query [, int $resultmode = MYSQLI_STORE_RESULT ] ) , where link is the connection identifier, query - query ... read carefully the docks - Alexey Shimansky