Page 1 of 1

how to retrieve information from mysql database

Posted: Mon Aug 21, 2006 10:37 am
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]


Would somebody please help me wit this issue :
I need to retrieve an information for records stored in a database.

1.- The user look a web page that ask for one field and then submit this field.
2.- The user retrieve in another web page the information relative to the field that he submit ... 

This is my code until now ...  

php:

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 ...
: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]

[quote="[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1"][b]3.[/b] Do not make multiple, identical posts. This is viewed as spam and will be deleted.[/quote]