• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Appending data to an anchor tag

phphtml


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();

Related Snippets

Phalcon: setStatusCode returns empty response

Reload parent page after submit in iframe

How to change HTML structure inside WP <head>

How can i call a function that executes an fpdf based on the choice of a form selector?

How to redirect to another page and call a Function there on Angular ng-click

How to get company posts from LinkedIn via API?

How to create custom authentication in laravel 8?

Laravel Pagination links() not working

Laravel unique validation on multiple columns

loop through an anchor id

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

Creating a config file in PHP

How to Generate PDF invoice to XML format using mPDF

Natural ORDER in Laravel Eloquent ORM

PHP returning an error message and false

About Contact Privacy policy Terms and conditions