Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-18
2
Medium Priority
?
190 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Computer Guy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35164803
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
 
LVL 14

Accepted Solution

by:
Scott Madeira earned 2000 total points
ID: 35164810
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question