Hi there,
I'm passing a string to a function. If the string has quotes in it, it will fail. Otherwise it works fine. I can identify that the quotes are the problem, but I don't know how to fix it.
Here is the function call ($Title is the variable in question):
echo "<a href=\"javascript: GetOrder(".$myrow["EventID"].", '".$Title."', ". $myrow['Cost'].", 0);\"><IMG SRC=\"../Graphics/TitleGraphics/payment_button_top.jpg\" ALIGN='bottom' BORDER=\"0\"></a>";
Here is the function (des receives the contents of $Title)
function GetOrder (id, des, amt, wgt)
{
....
}
So $Title passes its contents to "des" in the function and then "des" fails. But it only fails when $Title includes quotes. Without quotes, it works just fine. Can you tell me what is wrong and how to fix it?
Thank you, I really appreciate it!
Andrea 🙂