I have url as: /#profile/7 how to make it grab that last number from there? I'm looking for creating an mysql connection from that, SELECT something FROM somewhere WHERE id=':profile' Also, is it safe this way, is it even possible to make a connection? This is what I've got.
<script>
var hash = window.location.hash.substring(6);
alert (hash);
</script>