Jump to content

parts of web page loading on top of webpage


ldb358

Recommended Posts

what this is should do is echo the put the output in the picSelect div but instead they apear on top see what i mean on my site:

 

    username:Lane

    password:enter1

 

 

heres my code:

 


function userPage(){

        $username = $_SESSION['username'];

        $qFirst = mysql_query("SELECT firstName FROM users WHERE username='$username'");

        $qLast = mysql_query("SELECT lastName FROM users WHERE username='$username'");

        $qEmail = mysql_query("SELECT email FROM users WHERE username='$username'");

        $firstb = mysql_fetch_array($qFirst);
	$first = $firstb['firstName'];

        $lastb = mysql_fetch_array($qLast);
	$last = $lastb['lastName'];

        $emailb = mysql_fetch_array($qEmail);
	$email = $emailb['email'];

        $qgetImagesrc = mysql_query("SELECT * FROM ".$username." WHERE id='1'") or die(mysql_error());

        $qImagesrc = mysql_fetch_array($qgetImagesrc);
        //working on designing the page here

echo "<div class='body3'><div style='width:800px; height:20px;'></div><div class='pictureFill'><img src='". $username . "/" . $qImagesrc['name'] ."' style='width:100; height:150;'/></div><div class='userInfo'><blockquote><h3>$username</h3><p>$first $last<br/>$email<h4>$rating</h4></p></blockquote></div><br/><div class='pictureSelect' id='picSelect'>".loadImages($username);."</div><div class='pictureGallery'><img  name='mainImage' /></div></div>";

//add an if(isset(img1) else load upload first page

}

function loadImages($username){
$numberOfImages = mysql_query("SELECT imgNumber FROM users WHERE username='$username'");
$numImages2 = mysql_fetch_array($numberOfImages);
$numImages = (int)$numImages2['imgNumber'];
for( $i=1; $i<=$numImages; $i++){
	echo $i;
	$getName = mysql_query("SELECT name FROM ".$username." WHERE id='$i'");
	$loadName = mysql_fetch_array($getName);
	$name = $loadName['name'];
	echo "<input type='button' value='$name' onClick=\"mainImage.src='" . $username . "/" . $name . "' \"/><br/>";
}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.