• 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

Pagekite error: FAIL: localhost:8080 is down

Dropzone: Submit both form data and dropzone at once

PhP how to calculate moments with variables rows

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

Check for PDO Results, If None Display Message, If Yes then Loop Through

Multiply each value in array using array_map function

Inserting Country Selection into MySQL PHP [duplicate]

Unable to guess the mime type as no guessers are available Laravel 5.2

PHP: How to raise number to (tiny) fractional exponent?

How to send upload image through email

PHP random string generator

Increase value by 1 on button click

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

User pool client {id}does not exist

How to find the date a user created their Google account

About Contact Privacy policy Terms and conditions