Appending data to an anchor tag
PHP Snippet 1:
<a href="?ref=login_detail&id=<?php echo $car_id ?>">Hello</a>
PHP Snippet 2:
var_dump($_GET['id']);
PHP Snippet 3:
class Obj
{
public function login_detail($id)
{
//do something with passed $id
echo $id;
}
}
(...)
$obj = new Obj();
$obj->login_detail($_GET['id']);
PHP Snippet 4:
class Obj
{
public function login_detail($id)
{
echo $_GET['id'];
}
}
$obj = new Obj();
$obj->login_detail();