That works, but now I have another problem (he types while laughing to himself) and I hope you all can help.
I am making online e-cards an an FYI...
<?php
// grab info from the form . . .
$image = $_POST['image'];
$code = $_POST['code'];
$from_name = trim($_POST['from_name']);
$from_email = trim($_POST['from_email']);
$to_name = trim($_POST['to_name']);
$to_email = trim($_POST['to_email']);
$title = trim($_POST['title']);
$date = date("Y-m-d");
$message = addslashes(strip_tags($_POST['message'])); // Message for DB
$message_2_display = strip_tags(($_POST['message'])); // Message for User (no slashes)
// Show Preview
echo "<h1>$title</h1>";
echo "<div id='image'><img src='$image.jpg' border='0' alt='Image'></div>
<p>$date</p>
<p>$message_2_display</p>
<p><a href='mailto:$from_email'>$from_name</a></p>
<br>
<hr size='1' noshade>
<form method='post' action='create.php'>
<input name='image' type='hidden' value='$image'>
<input name='from_name' type='hidden' value='$from_name'>
<input name='from_email' type='hidden' value='$from_email'>
<input name='to_name' type='hidden' value='$to_name'>
<input name='to_email' type='hidden' value='$to_email'>
<input name='title' type='hidden' value='$title'>
<input name='message' type='text' value=\"$message\">
<input name='code' type='hidden' value='$code'>
<input type='button' name='edit' value='< edit' onClick='javascript:history.go(-1)'> |
<input type='submit' name='submit' value='Send >'>
</form>";
?>
This ALL works except my message field,
<input name='message' type='text' value=\"$message\">
It gets truncated. If a user enters three lines of information, it ONLY displays and inputs ONE line into the database??
I am confused, but I think it has something to do with the
nl2br
settings (or lack there of)
Can you guys help?
Thanks!
(Halojoy, I haven't given up PHP THAT easily!!)