answersLogoWhite

0

Code below assumes you have the connection, database and table working:

<?php

mysql_select_db("db_name");

$select = mysql_query("SELECT Name FROM table_name"); // Fetch a column

while($col=mysql_fetch_array($select))

{

echo "Name is ".$col['fname']; // Assumes table has a column by name 'fname'

}

?>

<?php

$name $_POST['name'] // Getting form value

// For fetching a row you need to use the 'WHERE' clause

$select = mysql_query("SELECT * FROM table_name WHERE Name='$name'");

while($row=mysql_fetch_row($select))

{

echo $row['Name']; // Prints name

echo $row['Surname']; // Prints surname

}

?>

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is queries in data base?

query is a request for retrive the information from the database.


What is the data structuer?

data structure is the way of organisise(storing) huge amount of data so that it is easy to retrive,update and delete the data.


List six major steps that you would take in setting up a database for a particular?

1. Requirement Analysis 2. Conceptual Data Base Design 3. Logical Data Base Design 4. Schema Refinement 5. Physical Data Base Design 6. Security Design


How do you retrieve data from database in lifo manner?

Just give an auto increment value in a column and retrive it in order dec. Then you get output in lifo order


What is the difference between data base and data base management system?

data base means a collection of data,which may be inter related. data base management system is a collection of programs for managing the data base.


What six major steps would you take in setting up a database in a particular enterprise?

1. Requirement Analysis2. Conceptual List_six_major_steps_that_you_would_take_in_setting_up_a_database_for_a_particularBase Design3. Logical Data Base Design4. Schema Refinement5. Physical Data Base Design6. Security Design


How you would set up a data base system particular organigation with explain?

setting up database and managing information Bangladesh company


Why do you have mining?

To retrive minerals which are useful.


Who are the database users?

The data base are not people but people make the data base like Steve jobs is a data base maker


Wwwmmsnetsa to retrive it mobile no 966506500984?

www.mms.net.sa


What is example of data base?

1- internet websites are made of a data base


What data base terminologies?

list 5 data base terminology and explain