php - window location not working javascript -
I have a problem on single and double coat in window space in javascript. I have this data in my database This is my php code: And if you are looking at it in the development tool it will be: I know that my error exam is quote ('test data'). How can I fix my quotation in the function so that it redirects you to another page at test.php? Change $ name To avoid epostrofy or better, use To avoid all special characters. test and I use it in the window's place like this:
function testing (name) {window.location.href = "http: // localhost / test / Tests.php? Name = "+ name; }
$ name = "test data"; Echo '& lt; Button onclick = "return exam (\ '.name.' '\')" Class = "btn btn-danger" & gt; Test & lt; / Button & gt; ';
& lt; Button onclick = "return test ('data of test')" class = "btn btn-danger" & gt; Test & lt; / Button & gt;
$ name = "test data" ;
$ name = addslashes ("test data");
Comments
Post a Comment