• 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

How to get the ID of the link in another page in php

phpmysql


PHP Snippet 1:

<a href="show.php?ref=<?php 
  echo htmlspecialchars(urlencode($row['name']));
?>&id=<?php 
  echo htmlspecialchars(urlencode($id));
?>" 
id="<?php 
  echo htmlspecialchars($id);
?>"><?php 
  echo htmlspecialchars($id) . '.' . htmlspecialchars($row['name']); 
?></a>

PHP Snippet 2:

<?php

   //show.php?ref=5&id=10

   echo $_GET['ref'];
   //5

   echo $_GET['id'];
   //10

?>

PHP Snippet 3:

<?php echo $_GET["id"]; ?>

Related Snippets

how do i retrieve and display the alt text of an image in wordpress?

PHP error: "The zip extension and unzip command are both missing, skipping."

Symfony 4: "Autowire: you should configure its value explicitly."

dockerizing Laravel + vue

laravel 5.6 bulk inserting json data

calling server using nusoap with complextype

Show only featured products in Woocommerce shop page

Calculating Median of an array in PHP

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

php mysql + create a friend request system

Log file is not being written in Laravel 5.5

How to separate letters and digits from a string in php

How do I get friend list from Friends table with counts of friends of my friends

Laravel: Why is my variable not being set while it's in the construct function of the controller?

Creating Combinations of Elements

About Contact Privacy policy Terms and conditions