in reply to Re: Whats wrong with this code.
in thread Whats wrong with this code.

Here is the HTML code generated by the use of CGI.pm, which does not work:

<form method="post" action="secalert_display.cgi" enctype="application +/x-www-form-urlencoded" target="_top" name="new"> <input type="submit" name=".submit" value="Enter a new record for a Se +calert" /> <input type="hidden" name="MODE" value="new" /> </form>

And here is the HTML generated by the use of the prints statements that DOES work.

<form name='new' method='post' action='secalert_display.cgi' target='_ +top'> <input type='submit' value='Enter a new record for a Secalert'> <input type='hidden' name='MODE' value='new'> </form>

Replies are listed 'Best First'.
Re^3: Whats wrong with this code.
by imp (Priest) on Feb 20, 2007 at 17:38 UTC
    You still didn't define what "does not work" actually means, and didn't include the code that is not handling the form input correctly.

    I know what I mean. Why don't you?

Re^3: Whats wrong with this code.
by eric256 (Parson) on Feb 20, 2007 at 17:35 UTC

    So start with the HTML generated by CGI and then slowly modify it to be the same as the other, when it works you'll know what was breaking your receiving script. It looks like the only significant changes are the enctype and the name of the submit field so you should probably start by changing one of those. Once you know the problem it should be easy to figure out how to either fix your receiving script to handle it or change your generating script to produce the HTML you need.


    ___________
    Eric Hodges
    A reply falls below the community's threshold of quality. You may see it by logging in.