Hey all!!
Had an idea to use a masonry grid(Pinterest) but have the function of the FB wall post(see pic). Wanted to make sure code was right. I echoed the results from the dropdown menu to show within the general grid. I also want pics in the general grid to link to profile page(pro.php) pertaining to the owner of the pic as well images from grid to show up on image gallery page(gallery.php)
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Upload Photo/Text</button>
<div id="myDropdown" class="dropdown-content">
<form action="upcontent.php" method="post" enctype="multipart/form-data">
<input type="file" name="fileToUpload" id="fileToUpload">
<br><br>
Words: <textarea name="comment" rows="5" cols="40"><?php echo $comment;?></textarea>
<input type="submit" value="Submit" name="submit">
</form>
</div>
</div>
<?php
echo $username;
echo $file;
echo $comment;
?>
<div class="grid">
<div class="grid-item"></div>
<a href="pro.php?id=<?php echo $row["username"]; ?>">
<img src="<?php echo $griditem; ?>" alt="" />
<p><?php echo $row["comment"]; ?></p>
</a>
<div class="grid-item grid-item--width2 grid-item--height2"></div>
<a href="pro.php?id=<?php echo $row["username"]; ?>">
<img src="<?php echo $griditem; ?>" alt="" />
<p><?php echo $row["comment"]; ?></p>
</a>
<div class="grid-item grid-item--height3"></div>
<a href=pro.php?id=<?php echo $row["username"]; ?>">
<img src="<?php echo $griditem; ?>" alt="" />
<p><?php echo $row["comment"]; ?></p>
</a>
<div class="grid-item grid-item--height2"></div>
<a href="pro.php?id=<?php echo $row["username"]; ?>">
<img src="<?php echo $griditem; ?>" alt="" />
<p><?php echo $row["comment"]; ?></p>
</a>
<div class="grid-item .grid-item--width2"></div>
<div class="grid-item"></div>
</div>
</div>
Thank ya