user1086738
user1086738

Reputation: 21

JQuery rating post to php

What's probelm in my code? My rate is not send to php.

This jQuery code worked for slide rating:

var action_submit_rating = "data.php?p='+type'&id='+item_id'&rate='+rating'"

Upvotes: 0

Views: 204

Answers (1)

Derek
Derek

Reputation: 4931

For starters,

var action_submit_rating = "data.php?p='+type'&id='+item_id'&rate='+rating'"

needs to be:

var action_submit_rating = 'data.php?p='+type+'&id='+item_id+'&rate='+rating;

You need to post complete code, not just a random chunk. The code you posted might work in some situations and might fail in others.

If you're still having problems, press F12 and see if there are any errors in your console.

Upvotes: 2

Related Questions