JackAtack Posted June 14, 2010 Share Posted June 14, 2010 Hi, Having some problem understand why this code always prints a 1 basically I pull the information from a database and I would like to use htmlentities in case someone gets the reCAPTCHA code wrong If they do get it wrong when the page refreshes it pulls their previous submitted resume from the database not what they have just entered original code <?php echo isset($update_array[17])?$update_array[17]:""; ?> working The following code always prints a 1 as you can see I have even tried the trim function but it does not work still prints a 1 <?php echo isset($update_array[17])?print trim(htmlentities($_SESSION['aao'],"1")) : print ""; ?> any ideas would be greatly appreciated Kind Regards Jack Quote Link to comment https://forums.phpfreaks.com/topic/204708-htmlentities/ Share on other sites More sharing options...
Alex Posted June 14, 2010 Share Posted June 14, 2010 print always returns 1. I think you mean this: <?php echo isset($update_array[17])? trim(htmlentities($_SESSION['aao'],"1")) : ""; ?> Quote Link to comment https://forums.phpfreaks.com/topic/204708-htmlentities/#findComment-1071716 Share on other sites More sharing options...
JackAtack Posted June 14, 2010 Author Share Posted June 14, 2010 I tried that code thank you AlexWD! it does work but now when there is a value in the array it wont echo it The field in the html is blank Maybe I will have to forget this idea and warn the user before they will submit This form has 107 fields Kind Regards Jack Quote Link to comment https://forums.phpfreaks.com/topic/204708-htmlentities/#findComment-1071736 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.