Jump to content

Recommended Posts

So the below is my attempt at pulling multiple bits of data from the database.... so far the only value that is returning anything useful is $RESUME. What am I doing wrong here? Thankx!

 

$query = "SELECT resume, firstname, lastname, interests FROM profile WHERE username = '$username'";
$results = mysql_query($query);
$num = mysql_num_rows($results);
while($row = mysql_fetch_array($results))
{
$RESUME = $row[0]; //GLOBAL RESUME
$FIRSTNAME = $row[1];
$LASTNAME = $row[2];
$INTERESTS = $row[3];
}

Link to comment
https://forums.phpfreaks.com/topic/85124-php-while-loop-mysql-data/
Share on other sites

<?php
$query = "SELECT resume, firstname, lastname, interests FROM profile WHERE username = '$username'";
$results = mysql_query($query);
$num = mysql_num_rows($results);
while($row = mysql_fetch_array($results))
{
echo $row[0].", ".$row[1].", ".$row[2].", ".$row[3];
}
?>

Does that do any good?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.