0

hi i used this simple form which are these..but i want to protect password from oracle database if user enter wrong name and password then not login otherwise login

 <!DOCTYPE HTML> <html> <head><br> <style>
.error {color: #FF0000;}
</style> </head> <body style="font-family: verdana, sans-serif;";> <hr /> <div style="width: 77%; height: 300px; padding: 30px; border: 5px solid #e3e3e3; background-color: #F8F8F8 ; color: #000; margin: 100px;" align="center"> <br> <h2>Login</h2> <form method="post" action="login.php"> <font size="3">name:<input type="text" name="name" style="padding: 4px;"/><p>
      password: <input type="password" name="password" style="padding: 4px;"/><p> <input type="submit" value="Login" style="padding: 4px; width: 5em; height: 1.9em;"/></font> </form> </div> </body> </html>
1

Technically, MySql is not a database server. It is a database engine and the engine plus the supporting hardware/software constitutes a database server. A database, however, is the set of tables/stored procedures, etc. specific to an implementation. That is why we refer to things like an employee database or a student database, meaning the specific implementation rather than the underlying hardware or DB engine.

But that's if you want to be pedantic. In the confines of an informal discussion everyone knows the OP's intentions.

0

hmm. it only displayes a few dozen lines of the end of the file. so then i tried:

with open(fileName, "rb") as infile:
    content = infile.read(1024)

it read the first 56 lines of the file which i guess is because of 1024. so read(size) is good, now i gotta figure out how to read the entire thing instead of it stopping at a few dozen lines. so increased to 4096 like:

content = infile.read(4096)

it read more than 1024 AND from the beginning of the file but of course not the whole file. I read that 4096 is the max number that can be used. if i use it with whilethe app crashes (not responding), idk why though.

of course i could do like size = 4096 content = infile.read(size * 4), which would read more but then 4 would need to be increased to a bigger number but thats seems totally wrong/redundant coz obvs in RL that would be absurd use. so now im stuck coz while isn't cooperating.

the file that i am currently working with (to test) is only 16.2 mb but the exact file size i will be using is 8gb.

0

Don't use readline() with binary files, because they are not organized in lines. If this is a big file, invoke read() with a size argument to read iteratively chunks of binary data.

with open(filename, 'rb') as infile:
    while True:
        data = infile.read(1024)
        if not data:
            break # we have reached the end of the file
        # do something with the bytes read
        print(hexlify(data).decode('utf-8'))
0

Hello experts i need help about screenshot code.

i have two form ( Form1 & Form2 ) form1 have one button and picturebox. and form two is empty.
i want to take screenshot with form width and Height. mean's where i move form2 and press Command1 button on form1 then it take a screenshot that area where is my form2. and save it in (c:/ drive)
my form2 is moveable so i can move my form anywhere.
Here i attached Example pictures.

i am very thanksfull to you .
Regard Razamughal

Attachments example1.JPG 96.6 KB example2.JPG 110.48 KB
0
<?php
require('db.php');
include("auth.php");
$id=$_REQUEST['id'];
$query = "SELECT * from new_record where id='".$id."'"; 
$result = mysqli_query($con, $query) or die ( mysqli_error());
$row = mysqli_fetch_assoc($result);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>View Records</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="form">
<p align='center'><a href="index.php">Home</a> | <a href="view.php">View Account</a> | <a href="logout.php">Logout</a></p>
<hr>
<p align='center'><font size='5'>Business Name Here</font></p>
<p align='center'><font size ='2'>Display Address here</font></p>
<p align='center'><font size ='2'>Contact Number here</font></p>
<hr>
    <table width="100%" border="1" style="border-collapse:collapse;">
    <thead>
    <tr><th><strong>Accnt No</strong>
    </th><th><strong>Name</strong>
    </th><th><strong>Address</strong></th>
    </th><th><strong>Contact No</strong></th>
    </th><th><strong>Loan Amount</strong></th>
    </th><th><strong>Loan Date</strong></th>
    </th><th><strong>Interest Rate</strong></th>
    </tr>
    </thead>
<tbody>
<?php
$count=0;
$sel_query="SELECT * from new_record where id='".$id."'";
$result = mysqli_query($con,$sel_query);
while($row = mysqli_fetch_assoc($result)) { ?>
<tr><td align="center"><?php echo $count; ?>
</td><td align="center"><?php echo $row["name"]; ?>
</td><td align="center"><?php echo $row["address"]; ?>
</td><td align="center"><?php echo $row["contact_no"]; ?>
</td><td align="center"><?php echo $row["loan_amount"]; ?>
</td><td align="center"><?php echo $row["loan_date"]; ?>
</td><td align="center"><?php echo $row["interest_rate"]; ?>
<?php $count++; } ?>
</tbody>
</body>
</html>
1

Hardest programs for me have NEVER been hard because of technical/coding issues. It's been the interpersonal component every time in a variety of ways (unreasonable timeline, unreasonable spec, people not knowing what they want, people not knowing what was possible and just saying "get it done" without defining "it" or "done" properly, etcetera, etcetera. My view is that when all the PEOPLE are on board and on the SAME board and are willing to cooperate, the technical/coding problems can be difficult, but usually surmountable.

Browsing this thread, I don't see any answers similar to mine. I'd be interested in how many other people look back at difficult projects and can pinpoint the main problem as a human problem. Maybe it's just me?

0

The hardest program wasn't the hardest because of its complexity although it did involve linked lists within linked lists within linked lists (possibly four levels deep). I wrote it to validate database definition files (text files used to create the hierarchical databases for each of dozens of hyroelectric generating stations, substations and converter stations) for an AGA/SCADA system being developed by Westinghouse circa 1982. The problem was a result of the engineer who had developed the specs. Instead af creating the spec, verifying it, then sending it to me for implementation, he instead sent me a spec which he would then continue rewriting. I had to develop the code while receiving changes up to a dozen times per day.

Fortunately, I developed the application by writing/debugging all of the support routines (list manipulation) first and creating a state machine to handle the rest. Multiple changes were tedious and frustrating but manageable.

As a side note, my predecessor had written an earlier version the used multiple data files as temporary storage whereas mine used in-memory linked lists. Running on an IBM mainframe, a typical run of the old algorithm cost about $24. My code (self-congratulatory pat on the back) cost under $0.25.