I have created this form below... its supposed to give you the whole code... but it doesnt work.. whats wrong =\? HTML Form: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Episode Code Generator</title> </head> <body> <form action="getcode.php" method="post"> <p>Episode Number: <input type="text" name="episodenumber" /><br /> Episode ID: <input type="text" name="eid" /><br /> Episode Title: <input type="text" name="episodetitle" /><br /> ExtraVite Tag {extravote #episode|number#}: <input type="text" name="extravotetag" /><br /> Description: <br/> <textarea name="fdesc"></textarea> <br /> HTML Code (embed code):<br/> <textarea name="htmlc"></textarea><br/> <input type="submit" value="Get Code" /> </form> </body> </html> HTML: getcode.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Get Code</title> </head> <body> <h4 id="<?php echo $_POST["eid"]; ?>" style="text-align: left;"><?php echo $_POST["episodenumber"]; ?></h4> <h3 style="text-align: left;"><?php echo $_POST["episodetitle"]; ?></h3> <p><?php echo $_POST["extravotetag"]; ?></p> <p><?php echo $_POST["fdesc"]; ?></p> <p> </p> <div id="<?php echo $_POST["eid"]; ?>" style="display: none;"><?php echo $_POST["htmlc"]; ?></div> <p><a href="#TB_inline?height=350amp;width=430&inlineId=<?php echo $_POST["eid"]; ?>" title="<?php echo $_POST["episodenumber"]; ?>" rel="sexylightbox"><p style="text-align: center;"><img src="images/stories/watch.png" border="0" /></p> <p style="text-align: center;"> </p></a></p> </body> </html> PHP: This is the output i want: <h4 id="eid" style="text-align: left;">episodenumber</h4> <h3 style="text-align: left;">episodetitle</h3> <p>extravotetag</p> <p>Desc.</p> <p> </p> <div id="eid" style="display: none;">htmlc</div> <p><a href="#TB_inline?height=350amp;width=430&inlineId=eid" title="episodenumber" rel="sexylightbox"><p style="text-align: center;"><img src="images/stories/watch.png" border="0" /></p> <p style="text-align: center;"> </p></a></p> Code (markup):
i don't know, is that a problem, but you missed & symbol after 350 / before amp: #TB_inline?height=350amp Code (markup):
I tried it and it looks like it's working. What exactly is wrong? Are you executing this on web server?
But he is outputing an URL, which, i think, should be #TB_inline?height=350&width=430&inlineId=eid and maybe that's why he is not getting what he wants. It's only my guess, i may be wrong
I want the output AS HTML... like in the code boxes here... i tried <pre> tags but its still processing the html thats in the output... i need it raw so my staff can just copy and paste it...
This is the output i want: <h4 id="eid" style="text-align: left;">episodenumber</h4> <h3 style="text-align: left;">episodetitle</h3> <p>extravotetag</p> <p>Desc.</p> <p> </p> <div id="eid" style="display: none;">htmlc</div> <p><a href="#TB_inline?height=350amp;width=430&inlineId=eid" title="episodenumber" rel="sexylightbox"><p style="text-align: center;"><img src="images/stories/watch.png" border="0" /></p> <p style="text-align: center;"> </p></a></p> ~the things in red are the INPUT
Yes yes, now i get it, just at first i didn't understood. You should use htmlentities() function i think, it converts < into < but browser still shows < (same for other symbols).
I'm also to lazy I.e. $s1 = '<h4 id="eid" style="text-align: left;">episodenumber</h4>'; $s2 = htmlentities($s1); Code (markup): And it will replace qoutes, < and > with html entities. Just test it
this becomes too complicated.. repacing > & < with their entites itself will be faster for this code... btw thanks YbutUs , aquiaax and atxsurf for helping
Do not make it complicated. Do one thing. Create a form in HTML properly with text box names, values etc. Use PHP Form Wizard to convert it into PHP file. This will make your work easier