<?php
include ("connect.php");
$_SESSION['username']="kai";
$username=$_SESSION['username'];
echo "Welcome,".$username."!<p>";
$query= mysql_query("Select * from avatar where name = 'username'");
if(mysql_num_rows($query)==0)
die("User not found");
else
{
$row = mysql_fetch_assoc($query);
$location = $row['imagelocation'];
echo "<img src='$location' width='200' height ='200'>.</p>";
}
?>
<p/> Upload New Avatar
<form method="post" enctype='multipart/form-data' action='view.php'>
File: <input type='file' name='myfile'>
<input type='submit' name = 'submit' value='UPLOAD'>
</form>
erickajan.cajucom 0 Newbie Poster
niranga 9 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.