Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function submitSearch(keyword) {
- alert(JSON.stringify({'tags':JSON.stringify(searchTags)}));
- $.ajax({
- type: "POST",
- url: "search-tags.php",
- data:JSON.stringify({'tags':JSON.stringify(searchTags)}),
- processData: false,
- contentType: "application/json",
- beforeSend: function(html) {
- $('#searchModal').foundation('reveal', 'close');
- $("#searchResults").html('');
- $("#homeScreen").hide();
- $("#resultsScreen").show();
- //$("#searchPhrase").html("Tag: " + searchString);
- },
- success: function(html){
- $("#searchResults").show();
- $("#searchResults").append(html);
- },
- error: function(html){
- alert("Error in search.");
- $("#searchResults").append(html);
- }
- });
- return false;
- };
- <?php
- //error_log(json_decode($_POST, true));
- //error_log($_POST[0]);
- print_r(count($_POST));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement