Note that there are some explanatory texts on larger screens.

plurals
  1. POdelete button on each row that echo
    primarykey
    data
    text
    <p>every time user insert information and click add button, new data will store to database and echo into this table</p> <p>table</p> <pre><code>&lt;tr&gt; &lt;td colspan="4" align="right"&gt; &lt;input type="image" value="image" src="images/btn_add.gif" onclick="action_1()"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" class="title_all_u"&gt;Family Member Summary&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;?php $query = "SELECT * FROM family_child WHERE LAS_login_id = ($emp_id)"; $result = mysql_query($query) or die(mysql_error()); echo "&lt;table border='1'&gt; &lt;tr&gt; &lt;th&gt;Family Type&lt;/th&gt; &lt;th&gt;Name&lt;/th&gt; &lt;/tr&gt;"; while($row = mysql_fetch_array($result)) { echo "&lt;tr&gt;"; echo "&lt;td&gt;" . $row['family_child_type'] . "&lt;/td&gt;"; echo "&lt;td&gt;" . $row['family_child_name'] . "&lt;/td&gt;"; echo "&lt;/tr&gt;"; } echo "&lt;/table&gt;"; ?&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>and this is insert query </p> <pre><code>if ( $action ==3 ) { $spouse_type = $_POST['spouse_type']; $spouse_name = $_POST['spouse_name']; $sql1 = "INSERT INTO family_spouse (LAS_login_id, spouse_type, spouse_name) VALUES ('$LAS_login_id', '".strtoupper($spouse_type)."','".strtoupper($spouse_name)."')"; </code></pre> <p>this 2 code is working for insert into database and echo in the page. How can I add delete button below <code>echo "&lt;td&gt;" . $row['family_child_name'] . "&lt;/td&gt;";</code> for each row that I echo so user can delete the wrong row in the display table.</p>
    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.
    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