Search code examples
phpmysqldelete-rowcorresponding-records

is it possible retrieve 2 values from this code?


<a href="deleteresnext.php?rid=< ?php echo $row->rid ?>" 
   onclick="return confirm('Are you sure you want to cancel reservation?');" >
     Delete
</a>

Can I retrieve 2 values using this code ? Because I need it to another php file, I would like to retrieve rid and roomid by the code above ?


Solution

  • Yes. You can add another parameter to that URL:

    <a href="deleteresnext.php?rid=<?php echo $row->rid; ?>&roomid=<?php echo $row->roomid; ?>" onclick="return confirm('Are you sure you want to cancel reservation?');" >Delete</a>