I'm new to PHP and HTML so go easy if you will :)
So I have this problem where when a user enters their steam trade-link into the field, it saves it as a tlink, which then converts it into a php variable (i think) called $link. So then I have a href so when they click on it, it starts a new tradeoffer with them.
mysql_query("UPDATE users SET `tlink`='$link' WHERE `steamid`='$steam'");
<a class="btn btn-primary btn-lg" style="text-decoration: none;" href="<?php echo $link;?>" target="_blank" >DEPOSIT </a>;
When you logon to my website I make you enter in your steamtrade URL and it saves that, which you can see below, but what happens is that you then click on a button called 'DEPOSIT', and it links you to mywebsitename/Resource%20id%20#4
, and instead I want it to link to the steam trade url they previously set.
What should I do?
-EDIT FOR BARMAR This is the code that I believes gets 'tlink', unless I'm reading it wrong.
<label for="link" style="color: #678098; font-size: 17pt;font-family: roboto;">Your Steam Trade URL: </label> <input type="text" name="link" class="form-control trade-url-input"style="" id="link" value="<?php echo fetchinfo("tlink","users","steamid",$_SESSION["steamid"]); ?>" placeholder="Link exchange">
is the code that gets 'tlink' and then (I think)
mysql_query("UPDATE users SET tlink='$link' WHERE steamid='$steam'");
makes it so tlink is equal to $link (unless again im wrong)
Heres my code of me inputting the $link
a class="btn btn-primary btn-lg" style="text-decoration: none;" href="<?php echo $link ?>" target="_blank" >DEPOSIT </a>