I have a simple form that generates a new photo gallery, sends the title and description to MySQL, and redirects the user to a page where they can upload photos.
Everything worked fine until the ampersand entered the equation. Information is sent from the jQuery modal dialog to a PHP page, which then sends the record to the database. After the successful completion of Ajax, the user is sent to the download page with the GET URL to tell the page to which album it is being loaded -
$.ajax ({ type: "POST", url: "../../includes/forms/add_gallery.php", data: $("#addGallery form").serialize(), success: function() { $("#addGallery").dialog('close'); window.location.href = 'display_album.php?album=' + title; } });
If the title has an ampersand, the "Title" field on the download page does not display correctly. Is there any way to avoid ampersand for GET?
thanks
jquery html ajax php get
NightMICU
source share