-1

If someone is loading my site like www.example.com/value?=something it will add the value to a mysql database

Like google https://www.google.com/search?q=something

I think it's easy but i'm a extremely noob to PHP and don't how to do it.

Weetz
  • 81
  • 10

2 Answers2

1

These are called query parameters.

<?php

$param1 = $_GET['q']; // something for http://localhost/script.php?q=something

http://php.net/manual/en/reserved.variables.get.php

mehulmpt
  • 15,861
  • 12
  • 48
  • 88
0

catch the value in a variable using

$variable = $_GET['value']

and then add $variable to your database.

Adheesh
  • 78
  • 7