retrieve data fields in mysql database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eeau1973
Forum Commoner
Posts: 27
Joined: Sat Aug 19, 2006 4:49 pm

retrieve data fields in mysql database

Post by eeau1973 »

Hi ... would some body please helpme with this ?...
I need to retrieve information from mysql database, first I show an html form that ask for field , then the user submit that information, and then i must return all the data that refear the information from a database.

thanks in advance.
:D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What have you written thus far? What parts are you having trouble with?
eeau1973
Forum Commoner
Posts: 27
Joined: Sat Aug 19, 2006 4:49 pm

php code until now ...

Post by eeau1973 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


This is my code until now ...

Code: Select all

<? 
mysql_pconnect("localhost","myuser","mypassword"); 
mysql_select_db("mydatabase"); 
$result = mysql_query("select * from `mytable`"); 
?>
<? 
while($r=mysql_fetch_array($result)) { 
$field1 = $r["field1"]; 
$field2 = $r["field2"]; 
$field3 = $r["field3"]; 
echo "$field1 <br> $field2 <br> $field3"; 
} 
?>
But the case is that i don´t know how to ask the user to input data and then process the form to then show the complete information of the record that match that field

thanks in advance again ... :D


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply