• 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

how to hide previous markers when new markers added in google map javascript api

Warning: sqlite_query() expects parameter 1 to be resource, string given

Convert regular text to array using notepad++

Getting values for an enum?

Edit XML in HTML form and submit to self

how to see if database exists with PDO [duplicate]

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

Symfony redirect if already loggedin from login page

Implode array with array of glue strings

PHP file_get_contents function

Not able to access model in the controller mautic

TesseractOCR not working for Laravel

Woocommerce product attributes with hierarchy like categories

dompdf and img tag, image wont show

Get WooCommerce product variation attribute terms in admin products general box

About Contact Privacy policy Terms and conditions