in the hope that some of you may want a really good laugh before you reply!
nobody will be laughing. it's a good idea, I like the generators like this.
when you paste a variable from a form into a textarea, lets use the inserted code's HTML friendly version:
echo ' <textarea name="aaaaaa" cols="45"
rows="5" wrap="virtual" id="aaaaaa">
'. (isset($_POST["aaaaaa"]) ? htmlspecialchars($_POST["aaaaaa"]): "") .'</textarea>';
When you create a string, be careful with single and double qoutes.
This is a bad example, becouse the variable won't be embedded into your string.
$header1='This variable comes from your form: $_POST["variable"] , stop.';
This is better:
$header1='This variable comes from your form: '.$_POST["variable"].', stop.';
In preview.php i can see something:
if ('$logo'==1)
the apostrofe mantioned before, if you check a variable in a function, you need to pass that as an argument:
<?php
function add_logo( $logo )
{
$details[1] = array( "image1.jpg" , "Some text 1", "left" );
$details[2] = array( "image2.jpg" , "Some text 2", "left" );
$details[3] = array( "image3.jpg" , "Some text 3", "left" );
$details[4] = array( "image4.jpg" , "Some text 4", "left" );
$imagename = $details[$logo][0];
$imagedetails = $details[$logo][1];
$imagealign = $details[$logo][2];
return ( '<img src="images/' . $imagename . '" width="111" height="112" border="0" alt="' . $imagedetails . '" align="' . $imagealign . '" />' );
}
/* how to test it: */
echo add_logo( 3 );
?>