Forum Moderators: open

Message Too Old, No Replies

Display data from mysql with php

         

ezeuba

8:02 pm on Aug 31, 2007 (gmt 0)

10+ Year Member



Hi everyone,
I am very very new to php coding and working with mysql. I recently started on a website with forms and mysql database. I have tried to get a grip on mysql basics and also php. On my testing server on my PC I have webdeveloper server suite (apache, php, mysql, phpmyadmin, etc.) I use dreamweaver cs3 for my designing since I am not very conversant with handcoding yet. Now on the site I am currently designing, I have a user registration form which I got from phpformgenerator v3. This serves my purpose to some extent, although with dreamweaver I can create forms which actually work with mysql as per data entry. My main problem is how to create a login page which will also display individual user data upon user login, based on a username and password form post. All my attempts to do this with dreamweaver seems to be limited since I could only get it to work for a single form field input. Please could anyone with a heart help me out of this problem as I am still a learner in trying to grasp php-mysql. I will apreciate any pointers and/or guidance on this issue, with any codes and explanations please, if possible.
Thanks a lot everyone.
Cheers...

physics

3:10 am on Sep 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi ezeuba and welcome to WebmasterWorld.com! Check out a recent post here:
[webmasterworld.com...]
Also, just look around the web for "php mysql tutorial". PHP is very easy to use with MySQL once you have the database connection and know how to get the info out of queries.

ezeuba

12:22 pm on Sep 1, 2007 (gmt 0)

10+ Year Member



Thanks for the reply you sent. However I am still at a loss about this problem. I can read and interpret mysql queries but writing them is another issue, since I am still new at hand coding. What I need is an example of a mysql query to display a users data from a table based on the user's login input (username, password). For instance: SELECT 'FIRSTNAME', 'LASTNAME' from 'info' WHERE $username='USERNAME' AND $password='PASSWORD';
Here I assume my table name is 'info' and the login input fields are $username and $password, again my table has values 'FIRSTNAME and 'LASTNAME'. Is this workable? If not, please guide me on how to improve it and get the desired results. I would also appreciate if you would also show an example of the record display, if possible.
I am asking this favour knowing you guys here are so knowledgeable about these things and hoping you could help out an eager newbie.
Thanks again.
Cheers...