Jump to content

POSTing an HTML "string" in a Dynamically Created Form


BertieIM

Recommended Posts

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.

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 />';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.