Page 1 of 1
retrieve data fields in mysql database
Posted: Sat Aug 19, 2006 5:07 pm
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.

Posted: Sat Aug 19, 2006 5:16 pm
by feyd
What have you written thus far? What parts are you having trouble with?
php code until now ...
Posted: Sat Aug 19, 2006 5:23 pm
by eeau1973
feyd | Please use 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 ...
feyd | Please use 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]