BertieIM Posted February 28, 2010 Share Posted February 28, 2010 I have listed some code below, I am pretty creative, but I lack the google skills to find an answer. I tried a few php built-in functions with no luck... Please help. Much appreciated (in advance). ... more code ... $errormsg = ''; $errormsg = '<b>!!!</b><span class="error"> PASSWORD DIDN\'T QUALIFY FOR GIVEN USERNAME</span> <b>!!!</b><br /><br />'; ... more code ... if($errormsg != '') { echo '<form id="go" action="error_stepone.php" method="post">' . '<input type="hidden" name="username" value="' . $username . '" />' . '<input type="hidden" name="password" value="' . $password . '" />' . '<input type="hidden" name="oops" value="' . $oops . '" />' . '<input type="hidden" name="errormsg" value="' . $errormsg . '" />' . '</form>'; echo '<script type="text/javascript">' . 'document.getElementById("go").submit();' . '</script>'; } ... possibly more code ... I know the answer is going to be simple its just that I am burning up too much fuel not getting anywhere. Oh... The actual visible output is that a portion of the $errormsg variable gets displaid momentarially before the next page loads, and then on the next page... the other portion of the variable gets displayed. I want the whole variable to be POSTed to the next page and all displayed there. Link to comment https://forums.phpfreaks.com/topic/193648-posting-an-html-string-in-a-dynamically-created-form/ Share on other sites More sharing options...
Rocu Posted February 28, 2010 Share Posted February 28, 2010 Tried the same code in my server, works just fine. edit// nevermind, I didn't insert quotes in the first place. Try replacing the quotes with HTML codes: " - " Like this: $errormsg = '<b>!!!</b><span class="error"> PASSWORD DIDN\'T QUALIFY FOR GIVEN USERNAME</span> <b>!!!</b><br /><br />'; Link to comment https://forums.phpfreaks.com/topic/193648-posting-an-html-string-in-a-dynamically-created-form/#findComment-1019344 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.