Quote:
|
Originally Posted by Richard m
Since my code shows a problem at
[php code]
Username <input type="text" name="ccustomer" value="<?php echo $_COOKIE['username']; ?>">
// This Notice appears in the username text box
// <br /><b>Notice</b>: Undefined index: username in
// <b>C:\Inetpub\wwwroot\LeakTech\customers\login1.ph p</b> on line
// <b>63</b><br />
[/php code]
Richard
|
You have to understand how you are switching in and out of PHP. Where this tag
<?php starts PHP mode and this tag
?> ends php. Comments in PHP are 'commented' by
/* */ or
// and Html comments are noted like
<!-- this is a comment --> what you are showing above does not use the correct syntax for the html mode of your code.
As for database connectivity you will have to understand your environment and use the correct connect strings, paths etc. I think you need to brake this down. First make sure PHP is working on your server, then test the database connection. You'll have to check out your server and see what it has and how its configured. I can't advise you on all of this. It is something you are going to have to investigate and study on your own or find someone willing to give more time to the effort, or hire it out. DreamWeaver has some tools for writing PHP but I think you will also need to learn PHP and MySQL to make it all work. I've spent a lot of time reading and testing to learn PHP but for the most part I still consider myself beginner.
Here is some code to check your PHP install, and get information about your server etc. Save this in a file 'test.php' save it to your server and run it.
PHP Code:
<?php
echo 'PHP is working.<br>';
echo phpinfo();
?>
.