Ok so this is my following javascript code:
$( '#listings' ).load( 'ajax/listingFind.php', {
id: id,
name: name,
logo: encodeURIComponent(logo),
address: address,
city: city,
state: state,
zip: zip,
phone: phone,
email: email,
web_link: encodeURIComponent(web_link),
distance: distance
} );
All of the id, name, etc has values assigned previously in javascript. However, in listingFind.php, how do I grab these data values that are being passed in? I load the file into the div and echoed out the entire url and it doesn't seem as if the data is getting passed into the url. Whenever I manually type it like so:
$( '#listings' ).load( 'ajax/listingFind.php?id=' + id + '&name=' + name + '&logo=' + encodeURIComponent(logo) + '&address=' + address +
'&city=' + city + '&state=' + state + '&zip=' + zip + '&phone=' + phone + '&email=' + email + '&web_link=' + encodeURIComponent(web_link) +
'&distance=' + distance );
etc etc etc... It throws an error saying :
Uncaught Error: Syntax error, unrecognized expression: Example Inc&logo=http%3A%2F%2Fstuff.blah.localhost%2Flisting%2Flogo%2glarb.png&address=123 Any Street N&city=Anytown&state=OH&zip=44123&phone=3305551234&[email protected]&web_link=http%3A%2F%2Fexample.com%2F&distance=16.85833142631359