I think i got it now :-)
a) table is printed on screen awaiting data(thats the first run of my login.pl script
b) client fills the form and submit it. Here is the tricky part. After this point, the 2nd run of login.pl, the user has already given the script the credentials so i can check them against the database without needed to print anything ont he screen and just redirect the suer in case thei are correct.

I was pretty stuck in the idea that "Just because the user has to do it first, doesn't mean that the code has to look that way.". I was thiniking that because i was askign the use to fill stuff,hence print header was issued" then no redirect would work afterwards.But now i relised that the if (redirect) structure its ok to come first.
If the sue has given out data and thay re ok, the user will be redirected withoutme have to rpitn anything, if he didnt post data than i would just print him the user inut table.

Damn, when iam stuck at something i really cant think fresh as you wisely saud. Phew, its ok i got it now! :-)
Thank you all!

In reply to Re^16: Redirecting values from 1 script to another by Nik
in thread Redirecting values from 1 script to another by Nik

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.