I juste want to know if there's a wayt to keep the text input from a user as the way they format it.
i'm building a kind of send a card to a friend for the St-valentine
http://www.mediaflexdesign.com/valen...Programingtalk
i want when the user is formating the message that will stay the same when then personne who receive the card have it on is card
the way i am proceeding now
1- i insert all feild in mysql
2 - when the pesonne get a card that is the script
PHP Code:
<?php
$conn = mysql_connect ( "127.0.0.1" , "rbruzzese" , "interdec" ) or die ( mysql_error ());
mysql_select_db ( "mediaflexdesign_com_-_test" , $conn ) or die( mysql_error ());
//mysql_query($add_card) or die(mysql_error());
$sql = mysql_query ( "SELECT * FROM `valentin` WHERE 1 AND `id` = $_GET [ id ] AND `pass` = $_GET [ no ] LIMIT 1" );
$loadcard = mysql_fetch_array ( $sql );
$id = $loadcard [ 'id' ];
$email_env = $loadcard [ 'email_env' ];
$email_rec = $loadcard [ 'email_rec' ];
$nom_env = $loadcard [ 'nom_env' ];
$nom_rec = $loadcard [ 'nom_rec' ];
$mes = $loadcard [ 'mes' ];
$choix = $loadcard [ 'choix' ];
$date = $loadcard [ 'date' ];
$pass = $loadcard [ 'pass' ];
$viewcard = $loadcard [ 'viewcard' ];
$dateview = $loadcard [ 'dateview' ];
$view = $loadcard [ 'view' ];
if ( $view == no ){
$add_card = " UPDATE valentin SET dateview = NOW(), view = 'yes' WHERE `id` = ' $id '" ;
mysql_query ( $add_card ) or die( mysql_error ());
}
//print "$id $email_env $email_rec $nom_env $nom_rec $mes $choix $date $pass" ;
if( $_GET [ no ] != $pass ) {
print "error" ;
}
?>
<html>
<head>
<title>Card</title>
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Nom {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #333399;
}
.msg {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
}
.envoyer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
color: #333399;
}
-->
</style>
</head>
<body class="body">
<?php
print $carte ;
?> <div align="center">
<table>
<tr>
<td><table align="center" border="0" cellspacing="2" cellpadding="0" class="table"><tr><td align="center"><?php include( " $choix .php" ); ?> <br></td>
</tr></table></td>
</tr>
<tr><td>
<br><table align="center" border="0" cellspacing="2" cellpadding="0" class="table" width="100%">
<tr>
<td> </td>
</tr>
<tr>
<td class="Nom"><?php echo $nom_rec ; ?> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td class="msg"><?php echo $mes ; ?> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="right" class="envoyer"><?php echo $nom_env ; ?> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><a href="index.php?nom=<?php echo $nom_rec ; ?> &email=<?php echo $email_rec ; ?> ">Send
to a friend</a></td>
</tr>
</table>
</td></tr>
</table>
</div>
</body>
</html>
http://www.mediaflexdesign.com/valen...43&no=81588587
(in the text you have there i put somme return and spaces)
the probleme is it if a put some return it won't show up same thing for the multipule space.
What i should do ?