Currently have this:
<script>
function copyToClipboard(info, text) {
window.prompt(info, text);
}
</script>
<?php
function getLink($user) {
return '<a class="clicky" onclick="copyToClipboard(
\'Copy to clipboard: Ctrl+C, Enter
Use this on any forum with [img] tags!\',
\'site/pcard.php?user='.$user.'\');">
<span class="label label-primary">Get Link</span>
</a>';
}
?>
<div class="well">
<form method="post">
<label>Get Signature Image</label>
<input type="text" placeholder="Username..." name="signame" />
<button type="submit" class="btn btn-primary">Look-up</button>
<?php
if (isset($_POST)) {
getLink($_POST['signame']);
}
?>
</form>
How would I go on to make this call that script with the posted info? Also, are there any other mistakes here?