insert data into MYSQL using PHP array

前端 未结 3 1143
遇见更好的自我
遇见更好的自我 2021-01-26 08:07

hi im trying to insert data in mysql using array, can someone please look at my code, i cant seem to make it work.

this is my post.php

/* POST.PHP */
$p         


        
3条回答
  •  一整个雨季
    2021-01-26 08:46

    in

    $myarray = array('','$title','$body','$rowId');

    code, you cannot use single quotations to read variables values in to string. you must use double quatations for that, because if you use single quotation, it not reading variable value, and php thinks its the value itself,

    try

    $myarray = array("","$title","$body","$rowId");

    this may help you...

提交回复
热议问题