3
Contributors
3
Replies
27
Views
3 Years
Discussion Span
Last Post by abhijit_2
0

Use select:

<select name="action">
    <option>update</option>
    <option>delete</option>
</select>

Then:

if($_POST['action'] == 'update')
{
    # run update query
}

elseif($_POST['action'] == 'delete')
{
    # run delete query
}

else
{
    # return error: no allowed action was selected
}

If, instead, you want to update and delete within the same request then paste your script and give us more information.

0
<select>
      <option value="update">update</option>
      <option value="delete">delete</option>
</select>

<input type="text" name="other" value="keyword">

//this will make a variable of the select option update

$update = $_POST['update'];

//this will make a variable of the select option delete

$delete = $_POST['delete'];

//this will make a variable of the select option other
// in other words, defines whatever text is inserted in the input box as variable.

$other = $_POST['other']."=".$_POST['keyword']."*";

Hope this helps

Edited by João_5

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.