passing PHP variables across javascript windows.open to another PHP page

不羁岁月 提交于 2019-12-02 12:33:00
tibc-dev

Not sure I am following but you might want to try:

$pdf_link = "<div class=\"pdf-box\"><a target=\"_blank\"  
onclick=\"return !window.open(this.href, 'pdf', 'width=640,height=300')\" 
href=\"http://mysite.com/create_pdf.php?text1=" . urlencode($text1)  .  "&text2=" . urlencode($text2)  .  "\"; 
return false;\">Create pdf</a></div>";

or

$fullLinkWithParams = urlencode("http://mysite.com/create_pdf.php?text1=" . $text1  .  "&text2=" . $text2);

$pdf_link = "<div class=\"pdf-box\"><a target=\"_blank\"  
onclick=\"return !window.open('" . $fullLinkWithParams  .  "', 'pdf', 'width=640,height=300')\">Create pdf</a></div>"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!