I made this named "confirm.sh":
#/bin/sh
#username and password are already given by the login form
if [ -s /home/alex/Desktop/Myfirstsite/allusers/$username ]; then
realpass=`cat /home/alex/Desktop/Myfirstsite/allpasses/$username`
if [ "$password" = "$realpass" ]; then
#continue with index.html
else
echo "Bad password"
fi
else
echo "Unknown username"
fi
because I wanted to make a program that checks if the clues given in the login form like this:
<table cellpadding=5 cellspacing=0 border=0>
<td style="padding:30"><br>
<form method="post" action="./confrim.sh" name=pform>
<input type="hidden" name="action" value="login">
<input type="hidden" name="user" value="deluxe">
<input type="hidden" name="hide" value="">
<table>
<tr><td><font style="font-family:times;color:Red" face="verdana,arial" size=-1>username?</td><td><input type="text" name="login"></td></tr>
<tr><td><font style="font-family:times;color:Red" face="verdana,arial" size=-1>pass?</td><td><input type="password" name="password"></td></tr>
<tr><td><font style="font-family:times;color:Red" face="verdana,arial" size=-1>�</td><td><font face="verdana,arial" size=-1><input type="submit" value="Enter"></td></tr>
<td colspan=2><font face="verdana,arial" size=-1>�</td>
</table>
</form>
</td></tr></table></td></tr></table>
<tr><td colspan=2><font style="font-family:times;color:Red" face="verdana,arial" size=-1>DNot a member? click<a href="./register.html">HERE</a> to become</td></tr>
</html>
As you can see I have selected to start confirm.sh on click.In fact, when I click, the only thing it does is to download confirm.sh to my download folder:(:(:(.How can I told to the html code to call confirm.sh only to confirm the username and the pass? Or, could you suggest me a better way on hoe to do this?(I think I should use <script> but I am not so sure how to use it...)
Sorry for the (maybe) to big answers you meed to write but I am tottaly new to html and so it is quite difficult for me to understand how I have to think.I can use unix scripting quite easily so you dont need to explain me further on this issue!