Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI not starting with new page after POST

Status
Not open for further replies.

skosterow

Technical User
Feb 23, 2002
135
0
0
US
if ($action eq 'None')
{
print "Content-type: text/plain\n\n";
$form01 = new CGI;

print @header_html;
print <<EOFHTML;

<form action=&quot;$script_dir&quot;&quot; method=&quot;post&quot;>
action: $action
<input type=&quot;submit&quot; name=&quot;action&quot; value=&quot;Start&quot;>
</form>
action: $action
EOFHTML
print @footer_html;
$action = $form01->param('action');
print $action;

if ($action eq 'Start')
{

print @header_html;
print <<EOFHTML;

action: $action

EOFHTML
print @footer_html;
}


} else {
print &quot;<br>--------------------<br>&quot;;
print &quot;action: $action&quot;;
}

the script prints the nested IF statement on the same HTML page after the user gets the data. HELP!
 
Not enough code provided to diagnose. Please post the entire program if not much longer than the above sample.

When you say &quot;the script prints the nested IF statement on the same HTML page after the user gets the data.&quot; do you mean that the user sees the CODE (implies problem with here document or quoting)? Or that the script inside the nested IF is executing? (implies param('action') is Start)?

It compiles and works OK for me - although the phrase &quot;works OK&quot; is hard to define as I'm not sure what you're trying to do.


Roger

 
Roger,

that is the script. But thanks!

I think i got it fixed.... my error im a little new to CGI! and i realy appreshiate the answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top