tags:

views:

56

answers:

1

Javascript

<script type="text/javascript">
function Edit(id)
{
    if(confirm("Are you sure to edit?")==true)
    {
        location.href='employee_set.php&edit='+id;
    }
}
</script>

PHP

<?php
if(isset($_GET["edit"])==false) {
    echo "no response";
} else {
    echo "link success";
}
?>

My problem is the Javascript is OK. The location href example. http://localhost/employee_set.php&amp;edit=30 ...

The PHP code is not working. Error is not found.

+7  A: 
location.href='employee_set.php&edit='+id;

should be

location.href='employee_set.php?edit='+id;
Soufiane Hassou
Thank you. Working.....
Jordan Pagaduan
@Jordan If this answer solved your problem you should [accept it](http://meta.stackoverflow.com/questions/5234/how-does-accepting-an-answer-work/5235#5235)
Michael Mrozek