How can I populate this form with data from the my database?

Hi,

I'm unable to get data from my database.

I left the connection variables blank (for secutiry reasons)

Can anyone get this to work?
Status-project.php
config.sql
LVL 3
Computer GuyAsked:
Who is Participating?
 
Scott MadeiraCommented:
I can't fix the code for you but here is what I would do to debug:

 
$query = "select * from $table";
$result = mysql_query($query) or die ("error");
$num = mysql_num_rows($result);

// See how many rows you are getting back
echo 'Num rows: '.$num.'<br />';

if($num > 0){
    $row = mysql_fetch_array($result) or die("error");

    // dump values of the rows
    print_r($row);

}

Open in new window


that should tell you if you are getting data back and what it looks like.
0
 
Lukasz ChmielewskiCommented:
Well, you need to post a file with the <form>.
There is no form, thus there is no $_POST variables. If there are no post variables then the fields are empty.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.