I have a form with three buttons.. one button is to edit form in another page, second one is to add value on existing page, third one its to delete value.. submit and edit works well.. now i need to work on delete button.. as it is a button.. i am unable to get value with $_POST or $_GET and $_REQUEST i have done something like this..
<form method="POST">
<input type="text" name="example_text" />
<a href="index.php?del">
<input type="button" value="Delete" />
</a>
<!-- works fine !-->
<a href="someotherpage.php">
<input type="button" value="edit" />
</a>
<!-- works fine !-->
<input type="submit" name="submit" />
</form>
<?php
if(isset($_POST['submit']))
{
echo "submit can get value by $_POST";
$name = $_POST['example_text'];
}
if(isset($_GET['del']))
{
$name = $_REQUEST['example_text']; // this can't get value;
$name = $_POST['example_text']; // this can't get value;
$name = $_GET['example_text']; // this can't get value;
}
?>