ShowCase Database name : mydb Tabel name : customer FIELD Bellow : --------------------------------------------------- ID | Name | Adress --------------------------------------------------- 1 | Ronald Jr | Newyork 20 ============================================ Ok, I will show the data of Ronald JR Like that Customer ID = 1 Customer name = Ronald Jr Customer Address = Newyork 20 Please give me the PHP source here
This sounds like homework for a programming class or something. If it is, I don't think we should be doing it for you.
<?PHP $connection = mysql_connect('localhost', 'BDUSERNAME', 'BDUSERPASSWORD'); $db = mysql_select_db('mydb',$connection); $query = mysql_query("SELECT ID,Name,Adress FROM customer WHERE ID='1' AND Name>='Ronald Jr' and Adress='Newyork 20"); while($r=mysql_fetch_array($query)){ echo"ID - $r[ID] , $Name=$r[Name] , Adress=$r[Adress]"; } ?> PHP: