in reply to Re: html input value
in thread html input value

i dont think my question is confusing. its simple and clear. how can you pass values from html its like how do u parse values from html source and read them in cgi script

Replies are listed 'Best First'.
Re^3: html input value
by hippo (Archbishop) on Oct 09, 2018 at 10:36 UTC

    See CGI 101 which has simple examples. Your original code prints output before header which is no doubt going to cause you problems.

Re^3: html input value
by marto (Cardinal) on Oct 09, 2018 at 10:45 UTC

    Your question could be seen to require clarification because the example you posted will just manually print a header (since you use CGI you can use it to print the header for you) and display an text input with a predefined value. You have no <form> element, and no way of submitting the input to your script. You seem to be missing the very basics of how all this hangs together. https://developer.mozilla.org/en-US/docs/Web as well as the CGI documentation (note the clear warnings at the start), Tutorials -> Web Programming I know what I mean. Why don't you?.

      yes i know. my html has no form. i just want to get value when the page loads

        You say
        i just want to get value
        Before you can get that, you need to decide FROM WHERE you want to get it.

        Then your understanding of everything I've linked to is wrong.