filesave

From: Date: Tue, 04 Mar 2003 08:08:52 +0000
Subject: filesave
Groups: php.general 
Request: Send a blank email to php-general+get-138048@lists.php.net to get a copy of this message
dear all, hi! i have an html page entry.html in which is a submit button that connect me to check.php on clicking it. but when i click on the "validate me" button, i get the "file download box"that asks whether i want to save the file on disk or open from current location. and what i want is that on clicking "validate me" button, the check.php should be displayed in internet explorer. sending below code for entry.html and check.php. thanks, diksha.<html> THIS IS ENTRY.HTML <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>User Name</title> </head> <body> <form method="POST" action="check.php"> <!--webbot bot="SaveResults" U-File="\\FORTUNESRV\common\diksha\_private\form_results.txt" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;&nbsp;&nbsp; User Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="login" size="20"></p> <p>&nbsp;&nbsp;&nbsp; User Password <input type="password" name="pass" size="20"></p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="regist.html">Sign in</a></p> <p>&nbsp;&nbsp;&nbsp; Not registered ?</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="regist.html">Sign up</a></p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <input type="submit" value="validate me"> </form> </body> </html> THIS IS CHECK.PHP <?php $connection=mysql_connect("localhost","root","")or die("Could not connect"); print "Connected successfully<br>"; mysql_select_db("bdoi_change")or die("could not select database"); $query = "select * from entry where login='$login' and pass='$pass' "; $result = mysql_query($query) or die("Query failed"); $num=mysql_num_rows($result); //present results based on validity. echo "$num<br>"; if($num==1) { echo "<P>You are a valid user!<br>"; } if($num==0) { echo "you are not authorised"; } ?>

« previous php.general (#138048) next »