Get a variable from php in html |
Get a variable from php in html |
FrostTaco |
Apr 26 2016, 08:27 PM
Post
#1
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
Hi guys, im new to this forum and kind of new to php, so sorry if this is a stupid question. Anyways, I have the following html code
CODE <a class="e-widget no-button" href="https://gleam.io/lA3JC/csgopossibly-and-csgo-skins-giveawayunclaimed" rel="nofollow">CS:GO(Possibly) AND CS:GO Skins Giveaway!(UNCLAIMED)</a> i have to take off the lA3JC/csgopossibly-and-csgo-skins-giveawayunclaimed, and replace it with the text you get from doing $_GET["id"] any help is appreciated! <script type="text/javascript" src="https://js.gleam.io/e.js" async="true"></script> |
CharlesEF |
Apr 28 2016, 09:14 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
$_GET is used to retrieve values from the query string of the URL. So, this code:
CODE <a class="e-widget no-button" href="https://gleam.io/lA3JC/csgopossibly-and-csgo-skins-giveawayunclaimed" rel="nofollow">CS:GO(Possibly) AND CS:GO Skins Giveaway!(UNCLAIMED)</a> Would become: CODE <a class="e-widget no-button" href="https://gleam.io/<?php if(isset($_GET["id"])) echo($_GET["id"]);?>/csgopossibly-and-csgo-skins-giveawayunclaimed" rel="nofollow">CS:GO(Possibly) AND CS:GO Skins Giveaway!(UNCLAIMED)</a> |
FrostTaco |
Apr 28 2016, 03:34 PM
Post
#3
|
Member Group: Members Posts: 47 Joined: 26-April 16 Member No.: 24,193 |
$_GET is used to retrieve values from the query string of the URL. So, this code: CODE <a class="e-widget no-button" href="https://gleam.io/lA3JC/csgopossibly-and-csgo-skins-giveawayunclaimed" rel="nofollow">CS:GO(Possibly) AND CS:GO Skins Giveaway!(UNCLAIMED)</a> Would become: CODE <a class="e-widget no-button" href="https://gleam.io/<?php if(isset($_GET["id"])) echo($_GET["id"]);?>/csgopossibly-and-csgo-skins-giveawayunclaimed" rel="nofollow">CS:GO(Possibly) AND CS:GO Skins Giveaway!(UNCLAIMED)</a> thanks alot! really needed this |
Lo-Fi Version | Time is now: 25th April 2024 - 12:35 PM |