The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Get a variable from php in html
FrostTaco
post 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>
<script type="text/javascript" src="https://js.gleam.io/e.js" async="true"></script>
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! blush.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post 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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
FrostTaco
post Apr 28 2016, 03:34 PM
Post #3


Member
***

Group: Members
Posts: 47
Joined: 26-April 16
Member No.: 24,193



QUOTE(CharlesEF @ Apr 28 2016, 10:14 AM) *

$_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 smile.gif laugh.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 05:24 AM