0

I'm using wamp server. And I use dreamweaver to create php files. Here is my code:

     -untitled.php
    <?php
 include 'E:\wamp\www\PHP\connection.php';
 $query ="SELECT * FROM students";
 $result = mysql_query($query);
 while($students = mysql_fetch_array($result)) {
     echo "<h3>".$students['LNAME'] ."</H3>";
 }
   ?>
   <h1>Create A user</h1>
<form action="create.php" method="post">
<input type="text" name="LName" value="" />
<input type="text" name="FName" value="" />
<input type="text" name="MName" value="" />
<input type="text" name="GradeOrYear" value="" />
<input type="text" name="Address" value="" />
<br/>
 <input type="submit" name="Submit" value="" />
</form>

      -Connection.php

     <?php
  $dbhost = 'localhost';
  $dbuser- 'root';
  $dbpass= '';
  $dbname = 'koro';
  $conn =mysql_connect($dbhost, $dbuser, $dbpass);
  mysql_select_db($db);
 ?>

But I get this error: http://www.mypicx.com/01172010/rs/

Please, how can I fix this error?

1
  • 1
    +1 to Ignacio - you've got $dbuser-'root' rather than $dbuser='root' Commented Jan 17, 2010 at 8:03

1 Answer 1

3

Did you mean $dbuser = 'root'; instead perhaps?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.