|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Alphanimal Smarty Rookie
Joined: 24 Apr 2004 Posts: 15
|
Posted: Mon Apr 26, 2004 4:21 pm Post subject: Convert GET- and POST-strings for output in textfield? |
|
|
Hi!
I have a string assigned directly from a form
like this:
Code: | $smarty->assign("email",$_POST['email']); |
and i want to display this value in a textfield. done like this:
Code: | <input type="text" name="email" value="{$email}"> |
works so far, but if i enter (eg.) test"123 PHP converts it into test\"123 and the value of the field will be test\ because the string ends with ".
so i will have to remove \ and change " into " or something.
so how do i have to format such strings, and is there a smarty function for it, so i can write value={$email|textfielvalue} or something
thanks! |
|
Back to top |
|
Alphanimal Smarty Rookie
Joined: 24 Apr 2004 Posts: 15
|
Posted: Mon Apr 26, 2004 4:35 pm Post subject: |
|
|
Hi again!
I now have found escape:"html"
but this is not waht i was looking for.
escape doesn't remove those backslashes... |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|