skip to Main Content

UPDATE request for SQL fails on querying from PHP but works good on SQL command line – Phpmyadmin

I am developing a page for stock maintenance. I am encountering a bizarre issue. When I run the PHP through AJAX everything works fine except for the mysqli_query part. <?php include 'dbconnector.php'; $item_code = json_decode(filter_input(INPUT_POST,'icode')) or die('line1'); $item_count = json_decode(filter_input(INPUT_POST,'icount'))…

VIEW QUESTION

Php versions – PHP result row as an object not set

I have this PHP code in which I try to edit a row in the database $sql="SELECT * FROM `event` where `EId`='".$_GET['EId']."'"; $res=$conn->query($sql); $numrows=mysqli_num_rows($res); if ($numrows>0) { $obj = mysqli_fetch_object($res); } if ($_REQUEST["mode"]=="save") { if ($_FILES['image']['name']!="") { del_img("event/",$obj->Picture); $Picture=post_img($_FILES['image']['name'], $_FILES['image']['tmp_name'],"event");…

VIEW QUESTION
Back To Top
Search