Hi i have a form called login.html where i enter my username and password to connect to my oracle db. I click the submit button and it will go to my memberlogin.php. If i have entered my details correctly a form should appear to enter data in my text field. If however i have not entered it correctly it should say "Sorry could not connect to database". I have a few question needing asking please: If i have not entered my details correctly i want my error message to appear. However, when i enter it incorrrectly i get the message:
Warning: ocilogon(): OCISessionBegin: ORA-01005: null password given; logon denied in /home/eland/u1/kbccs/w1009048/public_html/RAD/C2/memberlogin.php on line 20
Sorry, could not connect to the database
combined with my message. How can i therefore disable my warning?
Secondly, if it is wrong a link to the the login.hml should appear but it does not only the "Sorry, could not connect to the database". Can somone tell me why it is not appearing?
Last but not least, if it is correct, how do i change my code to incorporate the form section, if not the above error message i have written should appear.
<title> Login To Oracle </title>
<form action="memberlogin.php" method="POST">
Please enter your username: <br>
<input type="text" name="txtus" value=" " /> <br>
Please enter your password: <br />
<input type="password" name="txtps" value=" " /> <br>
<input type="submit" name="submit" value="submit" /> <br>
Note: This will allow you to connect to your oracle database.
<title> Member Login Page</title>
// create session variables
$_SESSION['psswd'] = $_POST['txtps'];
$_SESSION['usn'] = $_POST['txtus'];
$_SESSION['db'] = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)
(HOST = squirrel.wmin.ac.uk)(PORT = 1521))
(CONNECT_DATA = (SID = ORA8)(SERVER = DEDICATED)))';
// connect using session variables
$c= OCILogon($_SESSION['usn'], $_SESSION['psswd'], $_SESSION['db']);
Exit ("Sorry, could not connect to the database");
echo "<li><a href=login.html> Back to login </a></li>";
<form action="custretrieval.php method="POST" >
<b> Enter customer id to search: </b> <br>
<input type="text" name="memberid" value=" " /> <br>
<input type="submit" name="submit" value="Search" />
Your suggestions would be appreciated thanks.