Jump to content

Really odd mysqli_fetch_array behaviour


Minklet

Recommended Posts

I'm trying to populate a profile page with information from the database. Really bizarrely, every $row variable that isn't null returns as 'website', which is the database username. I have absolutely no idea why this is.

 

It might be worth noting I have just changed hosts...the only thing I can think might make a difference. Any help would be great, thankyou

 

 

query = "SELECT * FROM member WHERE username='$member'";
$result = mysqli_query ($dbc, $query) or trigger_error ("query: $query\n<br />MySQL Error: " . mysqli_error($dbc));

if ($result) {

while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {

	$member_id = $row['member_id'];
	$username = $row['username_id'];
	$photo = $row['photo'];
	$about = $row['about'];
	$slink = $row['soundcloud_link'];
	$mlink = $row['mixcloud_link'];
	$flink = $row['facebook_link'];
	$dlink = $row['divshare_link'];
	$mylink = $row['myspace_link'];
	$plink = $row['postbocks_links'];
	$website = $row['personal_website'];
	$type = $row['member_type'];
	$status = $row['status'];


}


}

}

Link to comment
Share on other sites

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.