in reply to Re^15: Redirecting values from 1 script to another
in thread Redirecting values from 1 script to another
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!