Note that there are some explanatory texts on larger screens.

plurals
  1. POI'm unable to update the entered data into db
    primarykey
    data
    text
    <p>Here is my code</p> <pre><code> &lt;?php include('admin/class.php'); </code></pre> <p>This is the db connection</p> <pre><code> $link = mysqli_connect("localhost", "root", "", "timesheet1234"); </code></pre> <p>here am giving action to my save button</p> <pre><code>if(isset($_POST['save'])) { $sel=@$_POST['selpro']; $mon=@$_POST['mon']; $tue=@$_POST['tue']; $wed=@$_POST['wed']; $thu=@$_POST['thu']; $fri=@$_POST['fri']; $sat=@$_POST['sat']; $sun=@$_POST['sun']; </code></pre> <p>This is where the problem occurs</p> <pre><code>if(isset($_SESSION['user'])) { echo "session user"; </code></pre> <p>It is not accepting the <code>mysqli</code></p> <pre><code>$stmt = mysqli_prepare($link,"UPDATE empdaytimesheet SET `projectcode`='$sel',`mon`='$mon',`tue`='$tue',`wed`='$wed', `thu`='$thu',`fri`='$fri',`sat`='$sat',`sun`='$sun' where `username`='".$_SESSION['user']."'"); mysqli_stmt_bind_param($stmt,"siiiiiii", $sel,$mon,$tue,$wed,$thu,$fri,$sat,$sun); $res= mysqli_stmt_execute($stmt); </code></pre> <p>It is not coming to this condition</p> <pre><code>if($res){ echo "&lt;script type='text/javascript'&gt;"; echo "alert('TimeSheet Saved..!')"; echo "&lt;/script&gt;"; echo "&lt;script type='text/javascript'&gt;"; echo "window.location='my_timesheet.php'"; echo "&lt;/script&gt;"; } </code></pre> <p>Instead it executes this:</p> <pre><code>else { echo "&lt;script type='text/javascript'&gt;"; echo "alert('Some Error Occured ! Retry..!')"; echo "&lt;/script&gt;"; echo "&lt;script type='text/javascript'&gt;"; echo "window.location='my_timesheet.php'"; echo "&lt;/script&gt;"; } } } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload