Im a little bit confused about something that i thought would be trivial
i want to have 2 links Edit and Delete i want the links to post an action in the url which could be checked by the target page to see what it needs to do
test.html
<a href="test.php?action=delete">Edit</a>
<br>
<a href="test.php?action=delete">Delete</a>
test.php
<?php
if ($action = 'edit')
{
echo $action. ' the file';
}
elseif ($action = 'delete')
{
echo $action. ' the file';
}
elseif (!$action)
{
echo 'the action variable aint set';
}
now it doesnt matter what link i click it always says "edit the file" im extremely confused and ive googled and searched this forum, could any1 please help