+ 2

I want to send 3 parameters in an URL to an PHP Script but my code produces an invalid assignment left-hand side error(URL)

https://code.sololearn.com/WgyOXiyDQdw4/?ref=app I tried to run my code in Firefox but my Code produces the error invalid left-hand assignment in the URL.I want to send these parameters in order to run a PHP function producing a calendar.But I thought using AJAX would be the right solution to have the user walk through the calendar without refreshing the page. I think there's something wrong in my code but I have no idea.Can you please help me?

22nd Jun 2018, 10:47 PM
hans
hans - avatar
4 Antworten
+ 2
Try this in your code, as string concatenation inside the method's parameter list is not always possible: var url = "index.php?index=mzsite" + "&q=" + month + "&s=" + year; x.open("GET", url);
24th Jun 2018, 2:58 PM
ServantCoder
ServantCoder - avatar
+ 1
It worked thank you very mu😀
3rd Jul 2018, 4:00 PM
hans
hans - avatar
0
*much
3rd Jul 2018, 4:00 PM
hans
hans - avatar
0
Most welcome. 😊
4th Jul 2018, 1:29 AM
ServantCoder
ServantCoder - avatar