php - generate code using form button and then display generated code on page -
i have 2 file code_generator.html. takes input image url , landing url when click on submit button calls code_created.php
<html> <head> </head> <body> <form action ="code_created.php" method ="post"> image : <input type ="text" name ="image"> landing url : <input type ="text" name="landingurl"> <input type= "submit"> </form> </body> </html>
i want show generated code below on web page
<div id='banner-img' style='display:none;text-align:center' onclick='landing()'><img style='text-align:center' id='bannerimage'/> <img id='t'/> <img id='trackeridimg' style='display:none;width:0px;height:0px'/> </div> <script type="text/javascript"> function showad() { document.getelementbyid('banner-img').style.display = 'block'; document.getelementbyid('bannerimage').setattribute('src',image url submitted html file); </script>
problem webpage not showing code generated code ,webpage rendering code , want show generated code.
1-how using html , php
2-is approach right
- you can use tag show html entities need encode all
- your html entities < => < way.
- also can show text area in html code need echo, not execute code print it.
Comments
Post a Comment