Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to update MYSQL field without refreshing page in PHP?
    primarykey
    data
    text
    <p>I wish to update MYSQL data using text instead of using submit button. Admin will choose option from combobox and then click at save to update the MYSQL records. How to do this using AJAX or jquery?</p> <p>My coding:</p> <pre><code>&lt;?php include('config.php'); $per_page = 9; if($_GET) { $page=$_GET['page']; } //get table contents $start = ($page-1)*$per_page; $sql = "SELECT bookingID,eventinfo.eventTitle,boothAlias,testbook.bstatus,date, testbook.username, customer.companyName, customer.contactName from eventinfo, testbook, customer where testbook.username=customer.username AND testbook.eventID=eventinfo.eventID order by date desc limit $start,$per_page"; $rsd = mysql_query($sql); ?&gt; &lt;form method="post" name="form"&gt; &lt;table width="800px"&gt; &lt;?php //Print the contents while($row = mysql_fetch_array($rsd)) { $id=$row['companyName']; $contactName=$row['contactName']; $eventTitle=$row['eventTitle']; //$phone=$row['phone']; $date=$row['date']; $status=$row['bstatus']; $booth=$row['boothAlias'] ?&gt; &lt;tr&gt;&lt;td style="color:#B2b2b2; padding-left:4px"&gt;&lt;?php echo $id; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $contactName; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $eventTitle; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $booth; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $date; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;select name='status' id='status'&gt; &lt;option value='-1'&gt;--Select--&lt;/option&gt; &lt;option value='0'&gt;Approve&lt;/option&gt; &lt;option value='1'&gt;Reject&lt;/option&gt; &lt;option value='2'&gt;Pending&lt;/option&gt; &lt;/select&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=#&gt;save&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } //while ?&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p><a href="http://i.imgur.com/IrOCt.jpg" rel="nofollow">image</a></p>
    singulars
    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.
    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