I have website which gives points when they click on name will be redirected to the linked webpage.These names are stored in my MySQL database. I have used following point system to give point (only 1 point)
<a href="" id="stack-overflow">www.stackoverflow.com</a>
Now in your js file:
$('#stack-overflow').on('click', function() {
count = 1
//send a ajax
$.ajax({
url:'usersdb.php',
type:'GET'
dataType: 'json'
data: {
points: count,
},
success: function(resp){
$('#stack-overflow').href='www.stackoverflow.com';
//now triggered this link
$('#stack-overflow').click();
//or what ever msg you want to display
});
});
instead of www.stackoverflow.com i want to display name form mysql database and link it to
url
in the same column I have 2 field in MySQL database 1) url
2) name
i want to display randomly name and link it to url
and display it on database only once and give one point.My signup information are kept in userdb.php. I want to store this point and display it again
</div>