Hello there.
My question is, how can I append submitted data at some page? I'll work with PHP and Javascript's CORS since I want it to appears at my forum.
Here is my code :
Javascript :
PHP code is ongoing.
My question is, how can I append submitted data at some page? I'll work with PHP and Javascript's CORS since I want it to appears at my forum.
Here is my code :
Javascript :
- Code:
(function($, w, r) {
w = w.substr(w.indexOf("/") + 1);
if (!r.test(w)) return;
$.post('form.php', {
TID : w.substr(w.indexOf("form") + 1, w.indexOf("s") - 1),
formPost : encodeURIComponent($('.post').html())
}).done(function() {
console.log('Data successfully transferred.');
}).fail(function() {
console.log('Failed to send data. Please contact the system administrator if this error persists.');
});
})(jQuery, window.location.pathname, /\d+/);
PHP code is ongoing.