buddylee17 216 Practically a Master Poster

Any server side language can do this. I suggest PHP but you could use any server side language(ASP, JSP, Coldfusion...) . To authenticate the user, you'll have to use a login page. Then you can deny access to the site for any user not logged in (inaccessible to the general public).

I'm not sure if there is any software available to do this, but if you are having someone build the site with a shopping cart, they should be capable of hiding the site behind a login.

buddylee17 216 Practically a Master Poster

Read up on password sniffing. It's great if your server is secure, but if the user is on a LAN then it's still possible to get hacked.

Good rules for any database:

1.) Never pull a password out of the database. Once it is in, it stays there. You can look for it in the query, but don't pull it out.

2.) You should never know your users actual password. This means that every password is encrypted before it gets to the database. This will make it much more difficult for a sniffer to intercept it and successfully login.

iamthwee commented: I like! +13
buddylee17 216 Practically a Master Poster
$header = "From:info@daniweb.com";
$header.= "\r\nCC:info@daniweb.com";
$header.= "\r\nBCC:info@daniweb.com";
mail("yourname@yourdomain.com", $subject,  $message, $header);

The mail function works differently depending on whether using Linux or Windows. This example is for Windows. I'm not sure if it works on Linux but, I'm sure it would be similar.

CC is an old term for Carbon Copy. It used to be that if you gave someone a document, you would make a carbon copy for yourself as proof. Now it is used to send to others as witnesses that the message was sent. All recipients of the CC are visible in the message.

BCC stands for Blind Carbon Copy. It is the same as CC except for the fact that the recipient doesn't get to see who else got a copy of the document.

buddylee17 216 Practically a Master Poster

Glad to help.

buddylee17 216 Practically a Master Poster

You should contact the host and find out if you have any sort of db admin tool. My host has phpMyAdmin. This allows you to interact directly with the db instead of writing php scripts, uploading them to the ftp, then running them once with no way (except for writing another script to query the db and display the results) of seeing if the data was entered the way you wanted it to be. If you don't have an admin tool you should be able to configure mysqlcc (open source tool by SourceForge.net) to directly interact with the db.

As for the parse error, you never closed the loop at the end.

echo "Error creating database: " . mysql_error();

?>

should be:

echo "Error creating database: " . mysql_error();
}
?>
buddylee17 216 Practically a Master Poster

A Session generally expires when the browser is closed. Just set the Session variable on the page that you want the user to access the search result through. Then on the search result page have a simple script like:

session_start();
if(!$_SESSION['loggedin']="valid")
{
header ('Location:login.php');
}

Notice the !(not sign). This will tell the server that if they are not logged in, to redirect them to the page (I used login.php) that you want them to go to.

buddylee17 216 Practically a Master Poster

On page 2,

print 'Name: <input type="text" name="name" value="'.$line[0].'" />';

This wont pass to page 3 unless it's between <form> and </form> though.

buddylee17 216 Practically a Master Poster

In order to submit variables to the second page, you'll have to find a way to get them inside of the form on the first page. On the first page, your form is empty, i.e. no variables actually make it in between the <form> and </form> tags. Use your loop to populate the table rows and columns. Then echo or print them into the form similar to this:

<?php
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die("unable to connect");
$line = $_GET['name'];
$result=mysql_query("SELECT * FROM hi where name='$line'");
$content="";
while($row=mysql_fetch_array($result))
{
$strRow=$row[0];
$content .="<tr><td>Name</td><td><input type="text" name="Name" value="$strRow[0]" /> </td></tr> \n";
$content .="<tr><td>age</td><td> <input type="text" name="Age" value="$strRow[1]" /></td></tr>";
}
?>
<html>
<body>
<form method="post" action="red11.php">
<table width='50%' border='1'>
<?php echo $content;?>
</table>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
buddylee17 216 Practically a Master Poster

Did you have a previous version of mysql installed before you installed wamp? If so, then you are trying to run both versions on port 3306. You will either have to delete the old one or configure one of them to run on a different port.

buddylee17 216 Practically a Master Poster

Line 3 should be: <?php if (have_posts()) :?>

buddylee17 216 Practically a Master Poster

You are still getting parse errors? Read my last post again.

buddylee17 216 Practically a Master Poster

Try this on line 60:
<?php else: ?>

Also, do you have header.php in the same directory? If not, you'll get a Fatal Error: Call to undefined function get_header()

buddylee17 216 Practically a Master Poster

Line 3 should be: <?php if (have_posts()) :?>
and
Line 60 should be: <?php ; else: ?>

buddylee17 216 Practically a Master Poster

Yeah sorry I updated my last post but I guess you didnt see it.

Line 3 should be: <?php if (have_posts()) :?>
and
Line 60 should be: <?php ; else: ?>

buddylee17 216 Practically a Master Poster

Found your problem. You are starting the while loop with a semicolon instead of a colon. It's unusual to see while: and endwhile; in php. Most of us just use braces. Anyway here's what you need to do:

line 23: <?php while (have_posts()): the_post() ;?>
Also make sure 55 has the semicolon.

Also
Line 3 should be: <?php if (have_posts()) :?>
and
Line 60 should be: <?php ; else: ?>

buddylee17 216 Practically a Master Poster

Try endwhile; on line 55. Note the semicolon instead of the colon

buddylee17 216 Practically a Master Poster

Get rid of the space in between <? and php on line1. i.e replace
<? php get_header(); ?>
with
<?php get_header(); ?>

buddylee17 216 Practically a Master Poster

Hello to all. This will be my first post. I need some advice on what to do with a hard drive.

I have a corrupt kernel file on a hard drive. The drive has been scanned several times (I slaved it on another pc and scanned with AVG) and appears to be virus free. All the data on the drive is intact but, for obvious reasons, the drive still wont boot.

I need to get the drive bootable again. I was going to run fixmbr on it in the recovery console but stopped after a warning message that said the following:

"This computer appears to have a non-standard or invalid master boot record.

FIXMBR may damage your partition tables if you proceed.

This could cause all the partitions on the current hard disk to become inaccessible.

If you are not having problems accessing your drive, do not continue."

How much of a risk I would be taking by running fixmbr?