Is there a way to use $row['username'] within this script to have the actual signed in username showing up where 'USERNAME' is? (Assume I have a query set up that works, it's not shown).
<script src="http://connect.soundcloud.com/sdk.js"></script>
<div id="soundcloud"></div>
<script>
SC.oEmbed("https://soundcloud.com/USERNAME", {color: "434C58", maxheight: 350, maxwidth: 450}, document.getElementById("soundcloud"));
</script>
Thanks in advance, any help much appreciated!!
EDIT: this looks quite messy but it actually worked.
<script src="http://connect.soundcloud.com/sdk.js"></script>
<div id="soundcloud"></div>
<script>
SC.oEmbed("https://soundcloud.com/<?php
$sql = mysqli_query($con, "SELECT * FROM Users WHERE username = '" . $_GET["username"] . "'
");
while ($row = mysqli_fetch_array($sql)){
echo $row['soundcloud'] ;
}
?>", {color: "434C58", maxheight: 350, maxwidth: 450}, document.getElementById("soundcloud"));
</script>