Question

The '?subject' and '&body' especially..

urlAddress = mailAddress+"?subject=" +mailSubject+"&body="+mailBody;
Était-ce utile?

La solution

The question mark denotes the start of parameters you are passing to the script. Subject is the first parameter. The '=' denotes an assignment, meaning subjects value is going to be whatever is in mailSubject. The ampersand denotes the start of a new parameter, in this case "body." Body's value will be whatever is in mailBody. You denote any number of new parameters to pass with more ampersands, for example:

someurl.com/somescript.php?parameter1=somevalue&parameter2=othervalue&parameter3=anothervalue
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top