php problem

php problem

Hello!! I have a problem ,i want to display the data of a single row in my database,this is the code:

include 'connectMySql.php'; $username=$row['username']; if(! $conn ) { die('Could not connect: ' . mysql_error()); } $sql = 'SELECT * FROM users WHERE username="'.$username.'" LIMIT 1';

$result = mysql_query( $sql); if(! $result) { die('Could not get data: ' . mysql_error()); }

while($row = mysqlfetchassoc($result, MYSQL_ASSOC)) { echo "ID : {$row['id']}
".

     "Firstname : {$row['firstname']} <br> ".
     "Lastname : {$row['lastname']} <br> ".      

     "Email    : {$row['email']} <br> ".
     "--------------------------------<br>";

} ;

?>

View Answers









Related Tutorials/Questions & Answers:
problem on php
problem on php   l have five tables and build them as forms and link between them php and database and i want to build query between them plz help me soon   PHP MySQL Tutorials
php problem
php problem  Hello!! I have a problem ,i want to display the data of a single row in my database,this is the code: <?php</p> include 'connectMySql.php'; $username=$row['username']; if(! $conn ) { die('Could
Advertisements
in php installation problem ?
in php installation problem ?   php installation in 7th step did not display y/n dialog box how to solve the problem
php sql problem - SQL
php sql problem  I ahve a php code that doesn't allow me to get the vat value from db. i tried to add $vat = 21; below $shippingCost = 10... NOW() is problem
PHP Sticky form problem
PHP Sticky form problem  I have done the full coding of a sticky form.... Please see my coding below...and advice me what is the problem, and what... Calculator</title> <?php if (isset($_POST['submitted']) &&
PHP Sticky form problem
PHP Sticky form problem  I have done the full coding of a sticky form.... Please see my coding below...and advice me what is the problem, and what... Calculator</title> <?php if (isset($_POST['submitted']) && !isset
Charset problem upon publishing PHP + MySQL website
Charset problem upon publishing PHP + MySQL website  Charset problem upon publishing PHP + MySQL website
problem to do coding upload image in php
problem to do coding upload image in php  can i get example coding how to upload image in php?i have try it but i dont no wheter it is correct...;/form> </body> </html> 2)upload.php: <?php if ((($_FILES
php
php   what is php   PHP Tutorials
php
php  what is php
php
php  my problem is when i display data like this $_POST["combo1"] it will show vlaue . suppose i select INDIA it shows "1" , but i want "INDIA... shortcut method in php like in javscript seletedIndex
php
php using javasript  how to set timer in php using javasript
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
php
php  i want to know about php and php plateform required software to make php program and database that used in php program?   Please visit the following link: PHP database
php
php  show the constructor overloading in php
PHP
PHP  How to work in drupal with PHP
Imagemagick in PHP - PHP
Imagemagick in PHP   i faced the problem while implement imagemagick code in php. Can you please post a sample code
PHP
PHP   hii, Define PHP?   Hello,ADS_TO_REPLACE_1 The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used
php
php  what is php   PHP is one of the most used open source server-side scripting language, which runs on almost all the platform. PHP... and Solaris. To know more about PHP, Visit Here
php
php  how to write a program in php to create pdf file
php
php  plz tell me code for PHP SQL Insert,delete,update,view is used to insert the record from HTML page to Mysql database using in single PHP form
php
php  retrieve data from mysql in php   Please visit the following links: http://www.roseindia.net/sql/mysql-table/mysql-php-select.shtml http://www.roseindia.net/sql/mysql-example/select-where.shtml
php
php  How to catch a image and link click counters using Ajax php can any one help me
php
php  how to set email remainder in php?can you help me pls
PHP
PHP  I want to create Calendar Event in PHP. Could u help me
PHP
PHP  How to check whether a username exists on a website using php and cURL and not MySQL
php
Write a simple PHP program that display the days of week as per the system date using switch case statement.  Write a simple PHP program that display the days of week as per the system date using switch case statement
PHP
PHP  I would love to do PHP project with the title of "Hospital Management System". I want to know how to make validation using jquery
php
php  im beginner to php. i faced problem with creating form and data stored into mysql <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <
php
php  im beginner to php. i faced problem with creating form and data stored into mysql <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <
php
can learn php mysql connectivity examples from the given link: PHP Mysql Connectivity
php - Ajax
php  ajax wiht php registration coding with validation coding also  Hi mohamed Please follow this link to find your problem http://www.roseindia.net/ajax/ajaxlogin/ajax-registration-program.shtml Thanks
PHP Property Management - PHP
PHP Property Management  PHP Property Management.. any idea
rotate image in php - PHP
rotate image in php   Function to rotate image in PHP
php means
php means  php means
PHP form
PHP form  Hi Sir/Madam, I am developing an attendance form using php, which displays the name and ID of a Employees which are fetched from Db and I am adding one textfield to enter the Attendance... The problem is I am
PHP duplicate file - PHP
PHP duplicate file   i wanted to duplicate a PHP file resides in different directory on submission
PHP MVC Framework - PHP
PHP MVC Framework   Which is the best & latest PHP MVC Framework... and where can i download it. Thanks
php generate link - PHP
php generate link  How can i generate links in PHP for my photo gallery app
$_get php example - PHP
$_get php example  Explain the $_get method in php with a simple example. m a beginner
php text encoding - PHP
php text encoding  How to encode the text editor text in PHP...how can it be done
php a href
php a href  How to use php a href to pass the value in PHP
What's PHP ?
What's PHP ?  What's PHP
PHP Prevent blank upload
PHP Prevent blank upload  In my small PHP application, i am posting a data to server using POST method in PHP, which is working fine. But the problem is that it also accepts blank data as well as duplicate value. Is there any way
Pagination in PHP code - PHP
Pagination in PHP code  3.Pagination in PHP codeIs it possible to get the paging in PHP without database call? How will I show the image instead of numbering? any code that can help
Array length in PHP - PHP
Array length in PHP  a function to get the array length in PHP.  Hi Friend, Please visit the following link: http://www.roseindia.net/tutorial/php/phparray/php-array-length-for.html Thanks
Replace String in PHP - PHP
Replace String in PHP  What is the fastest way of replacing string in PHP Code?  Hi Friend, Please visit the following link: http://www.roseindia.net/tutorial/php/phpbasics/PHP-Array-Replace.html Thanks
password encryption in php - PHP
password encryption in php  example of password encryption in php
What-is-PHP - PHP
What-is-PHP  Hi, I would like to know more about PHP. What PHP and how it is good for programming websites? Thanks Deepak   Hi, Read more about PHP at http://www.roseindia.net/php/ Thanks
fetch url in php - PHP
fetch url in php  How to Fetch URL in PHP

Ads