Help a newbie get started.

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: macek, egami, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Help a newbie get started.

Post by johnj » Sat May 21, 2011 8:26 am

You need to do the following steps:

a).Establish a connection with the database server
b).Then, run the sql you have created
c).Pull the results returned and display it

Here is an example:
http://phillipnb.wordpress.com/2010/12/

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Help a newbie get started.

Post by johnj » Sun May 22, 2011 6:30 am

Your code has steps a and b. Now you need to do step c. Here is a sample code:

Code: Select all

while ($row = mysql_fetch_assoc($myResult)) {
    echo "<br/>".$row["userid"];
    echo "<br/>".$row["firstname"];
    echo "<br/>".$row["lastname"];
    echo "<br/>";
}
 
I do not know what fields your table 'memb_info' has. userid,firstname and lastname are the fields, you need to change them. echo does the display...so, you should now be able to see the data on a web page
Last edited by johnj on Sun May 22, 2011 6:36 am, edited 1 time in total.

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Help a newbie get started.

Post by johnj » Sun May 22, 2011 6:35 am

I am trying to do this with my hosting account cpanel/phpmyadmin so I assume that is what you are talking about in (a).
No, I am talking about what you did at the top of the code,i.e. telling php where your database server is, what user name and password to use to login, the database name ...upto to the line mysql_connect().

The rest, you have already figured that out.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests