Pavlos1316 Posted July 23, 2008 Share Posted July 23, 2008 hi is there a way that when you set a value for a text field not to be visible inside the text field? thank you Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/ Share on other sites More sharing options...
ratcateme Posted July 23, 2008 Share Posted July 23, 2008 do you mean a hidden form field <input type="hidden> Scott. Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597209 Share on other sites More sharing options...
secoxxx Posted July 23, 2008 Share Posted July 23, 2008 either hidden like ratcatme said or <input type="password"> Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597210 Share on other sites More sharing options...
Pavlos1316 Posted July 23, 2008 Author Share Posted July 23, 2008 no let me refrase if I write <input name="Name" type="text" id="Name" size="50" maxlength="19" value="Full Name"/> I get a textfield that inside user can see whatever I set in value="". for this ex. Full Name I need it to be a visible textfield but without show the value I set. Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597215 Share on other sites More sharing options...
ratcateme Posted July 23, 2008 Share Posted July 23, 2008 whats the point in that they are going to see the value when they view the page? it appears what you want to do is imposable. Scott. Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597221 Share on other sites More sharing options...
secoxxx Posted July 23, 2008 Share Posted July 23, 2008 umm, name="Full Name" and no value ? Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597223 Share on other sites More sharing options...
MasterACE14 Posted July 23, 2008 Share Posted July 23, 2008 you mean something like this? <?php if(isset($_GET['Name'] && !empty($_GET['Name'])) { $value = "value=\"" . $_GET['Name'] . "\""; } else { $value = "value=\"\""; } ?> <input name="Name" type="text" id="Name" size="50" maxlength="19" <?=$value?> /> Regards ACE Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597238 Share on other sites More sharing options...
papaface Posted July 23, 2008 Share Posted July 23, 2008 Use CSS to make the text in the box white (or match the bg colour). Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597244 Share on other sites More sharing options...
mmarif4u Posted July 23, 2008 Share Posted July 23, 2008 Nope, i don't think he want it like that way. I already give him idea in other thread. He want to set full name to value but will not be visible. which i think is not possible. Using hidden can.but he is not talking about that.He want to give visible textbox with value hidden. NOT POSSIBLE like this way.i didn't heard that in my whole life. maybe have solution. Not sure. @MasterACE14 <input name="Name" type="text" id="Name" size="50" maxlength="19" <?=$value?> /> <?=$value?> Is this working in PHP 5.2.6 and above to echo a value? Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597257 Share on other sites More sharing options...
JasonLewis Posted July 23, 2008 Share Posted July 23, 2008 either hidden like ratcatme said or <input type="password"> Seems like a fair sort of answer, then the value will be visible but will appear as ****** Use CSS to make the text in the box white (or match the bg colour). You could just highlight the text. Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597261 Share on other sites More sharing options...
LemonInflux Posted July 23, 2008 Share Posted July 23, 2008 Nope, i don't think he want it like that way. I already give him idea in other thread. He want to set full name to value but will not be visible. which i think is not possible. Using hidden can.but he is not talking about that.He want to give visible textbox with value hidden. NOT POSSIBLE like this way.i didn't heard that in my whole life. maybe have solution. Not sure. @MasterACE14 <input name="Name" type="text" id="Name" size="50" maxlength="19" <?=$value?> /> <?=$value?> Is this working in PHP 5.2.6 and above to echo a value? To be honest, I still have no idea what he's trying to do :S And no, short tags are not valid in PHP5 unless enabled in the php ini. By default, they're disabled. I think so, anyway :S ---------------- Now playing: Linkin Park - [Chali] via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597268 Share on other sites More sharing options...
mmarif4u Posted July 23, 2008 Share Posted July 23, 2008 Yeh, you are right.short tags are not allowed by default any more in PHP. One of our programmer make such codes in short tags for a project. When i update to PHP 5.2.6. PHP didn't parse the code.I changed all tags to <?php echo .... ?> Then it works. Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597275 Share on other sites More sharing options...
Pavlos1316 Posted July 23, 2008 Author Share Posted July 23, 2008 sorry my mistake i didn't say what i am trying to do.. i am trying to count my empty fields when user submits the form but only when i set value is working ex if((count($sometng) + count($sopo))<2) echo... Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597304 Share on other sites More sharing options...
LemonInflux Posted July 23, 2008 Share Posted July 23, 2008 Count up (manually) the number of values you're expecting. Then do that - count($_POST) ---------------- Now playing: Linkin Park - By_Myslf (Josh Abraham & Mike Shinoda) via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597306 Share on other sites More sharing options...
Pavlos1316 Posted July 23, 2008 Author Share Posted July 23, 2008 what do you mean by count up manualy? Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597313 Share on other sites More sharing options...
Pavlos1316 Posted July 23, 2008 Author Share Posted July 23, 2008 THIS DID WHAT I WANTED... if ((empty($FieldName) + empty($FieldName2) + empty($FieldName3) + empty($FieldName4) + empty($FieldName5) + empty($FieldName6)) > 1){ include....; echo...; exit(); COUNT IF MORE THAN 2 FIELDS ARE EMPTY. SORRY IF I DIDN'T EXPLAINED IT CORRECT. THANKS FOR HELPING Link to comment https://forums.phpfreaks.com/topic/116136-solved-value/#findComment-597441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.