Javascript Redirect - Control It with Php -


here script use redirection:

<form id="form1" method="post" action="http://yahoo.com"> <script language="javascript" type="text/javascript">     document.getelementbyid('form1').submit(); </script> </form> 

now have control php code, 1 doesn't work:

 $redirect = '<form id="form1" method="post" action="http://google.com">  <script language="javascript" type="text/javascript">     document.getelementbyid('form1').submit();  </script> </form>'  

i guess there syntax error, unable figure out. please help.

also let me know ok redirect method keeps script execution page referrer?

you getting ' wrong inside getelementbyid

$redirect = '<form id="form1" method="post" action="http://google.com">  <script language="javascript" type="text/javascript">     document.getelementbyid("form1").submit();  </script> </form>'  

by way, unusual way of doing redirect. why not use window.location.href instead?

or php header redirect?

header("location: http://www.google.com/"); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -