Jump to content

Mekaboo

Members
  • Posts

    51
  • Joined

  • Last visited

  • Days Won

    1

Mekaboo last won the day on June 20 2019

Mekaboo had the most liked content!

Previous Fields

  • Languages
    HTML, PHP, JS

Profile Information

  • Gender
    Female
  • Location
    Washington,DC,USA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mekaboo's Achievements

Newbie

Newbie (1/7)

2

Reputation

  1. @Ingolme Thank Ya🧡
  2. Hey all!! Trying to delete huge empty space between 2 divs...here is my code: <div class="wrapper"> <div class="page-content"><h1>Welcome <?php echo $username;?></h1></div> <div class="menu"> <ul> <li><a href="profile.php">Profile</a> </li> <li><a href="trip.php">Reservations</a> </li> <li><a href="firms.php">Companies</a> </li> </ul> </div> </div> </div> <div class="container"> <!-- Calendar container --> <div id="calendar"></div> </div> Thank ya!!!
  3. Hey all!!! I have overlays working on my hexagon grid but the issue is I cant get the overlays to separate for each hexagon. How do I get it to where each hexagon will have its on overlay? Thankya😊 <div class="container"> <section class="hexagon-gallery"> <div class="hex"><img src="img/hiw.png"> <div class="overlay"> <div class="text">Hello World</div> <a href="default.asp" target="_blank">This is a link</a> </div></div> <div class="hex"><img src="img/wc.png"> <div class="overlay"> <div class="text">Hello World</div> <a href="default.asp" target="_blank">This is a link</a> </div></div> <div class="hex"><img src="img/sc.png"> <div class="overlay"> <div class="text">Hello World</div> <a href="default.asp" target="_blank">This is a link</a> </div></div> <div class="hex"><img src="img/ew.png"> <div class="overlay"> <div class="text">Hello World</div> <a href="default.asp" target="_blank">This is a link</a> </div></div> </section> </div>
  4. @Ingolme EUREKA YOU FOUND MY ISSUE😂❤️
  5. @Ingolme The closing body tag is highlighted which to me mean its not closed. There is an error somewhere..going to figure it out😊
  6. @Ingolme I wasn't getting an error message and that's the thing that blows me because it makes it hard to correct. It's something in the body but don't know what it is☹️
  7. Hey😊 Ive attached a file to review. Unfortunately the final body/html tags wont close due to an error. Ive don't inspect and debug but nothing pops up. Question is where is the error within the file? Thank ya ❤️ mucode
  8. Thank ya so very much❤️ @Ingolme
  9. Hey 😊 How do I get the modal to work with all the images within the loop? So far it only works with the most recent uploaded image with the older images dont move. Here is code: <?php require_once "db.php"; $sql = "SELECT imageId,comment FROM output_images ORDER BY imageId DESC;"; $result = mysqli_query($conn, $sql); // Loop thru comments and display all of them while($row = mysqli_fetch_array($result)) { printf("%s (%s)\n", $row["imageId"]); ?> <img id="myImg" src="imageView.php?image_id=<?php echo $row["imageId"]; ?>" /><br/> <div id="myModal" class="modal"> <span class="close">&times;</span> <img class="modal-content" id="img01"> </div> </div> <?php } ?> </BODY> <script> // Get the modal var modal = document.getElementById("myModal"); // Get the image and insert it inside the modal - use its "alt" text as a caption var img = document.getElementById("myImg"); var modalImg = document.getElementById("img01"); var captionText = document.getElementById("caption"); img.onclick = function(){ modal.style.display = "block"; modalImg.src = this.src; captionText.innerHTML = this.alt; } // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } </script> Thank ya💙
  10. Hey 😊 <?php require_once "db.php"; if(isset($_GET['image_id'])) && if(isset($_GET['comment'])) { $sql = "SELECT imageType,imageData FROM output_images WHERE imageId=" . $_GET['image_id']; $result = mysqli_query($conn, $sql) or die("<b>Error:</b> Problem on Retrieving Image BLOB<br/>" . mysqli_error($conn)); $row = mysqli_fetch_array($result); header("Content-type: " . $row["imageType"]); echo $row["imageData"]; } mysqli_close($conn); ?> I added 'comment' column to the 'output_images' table and also added 'if(isset($_GET['comment']))' which works for the comment part but the images (imageId) now don't show. I feel that I need to add '. $_GET['comment']' to the sql line but when I do it messes things up more. How to get both imageId and comment to work together?
  11. @dsonesuk Thank ya so very much..got it💙
  12. @dsonesuk You have been outstanding help❤️ Ive taken you advice and now have DB connection but dont know where to place SELECT statement to retrieve data. Im down to the finish line 😂Code: <?php $comment = filter_input(INPUT_GET, 'comment'); if (!empty($comment)){ $host = ""; $dbusername = ""; $dbpassword = ""; $dbname = ""; // Create connection $conn = new mysqli ($host, $dbusername, $dbpassword, $dbname); if (mysqli_connect_error()){ die('Connect Error ('. mysqli_connect_errno() .') ' . mysqli_connect_error()); } else{ $sql = "INSERT INTO comment(comment) values ('$comment')"; if ($conn->query($sql)){ echo "New record is inserted sucessfully"; } else{ echo "Error: ". $sql ." ". $conn->error; } $conn->close(); } } else{ echo "Comment should not be empty"; die(); } ?> <?php $result = mysqli_query("SELECT * FROM comment"); ?> <p><?php echo $GET["comment"]; ?></p> </div> </div>
  13. @niche <form action="pro.php" method="post"> Bio: <input type="text" name="bio"><br> <input type="submit"> </form> </div> <?php if (isset($_POST['submit'])) { echo "pro.php"; } ?> Sorry for delay...hung with a dear friend😊 I changed my form because I noticed the <textarea> tag doesn't seem to process within a form.
  14. @niche Thank ya as always❤️ Issue now is that content disappears. This is mainly due to the fact that things are not connected to DB. Working on that. <?php require_once "db.php"; $sql = "SELECT comment FROM tbl_member ORDER BY comment DESC Limit 1"; $result = mysqli_query($conn, $sql); ?> <p><?php echo $_POST["bio"]; ?></p> This is the results page....trying to get info from submission from one page to go into DB and display and stay permanent on another.
  15. Hey😊 Login/register session <?php session_start(); if (isset($_SESSION["username"])) { $username = $_SESSION["username"]; session_write_close(); } else { // since the username is not set in session, the user is not-logged-in // he is trying to access this page unauthorized // so let's clear all session variables and redirect him to index session_unset(); session_write_close(); $url = "./index.php"; header("Location: $url"); } ?> Form <?php // define variables and set to empty values $commentErr = "; $comment = "; function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["comment"])) { $comment = ""; } else { $comment = test_input($_POST["comment"]); } } ?> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> Bio: <textarea name="comment" rows="5" cols="40"><?php echo $comment;?></textarea> <input type="submit" name="submit" value="Submit"> </form> </div> Result Echo (placed on another place pro.php) <p><?php echo $_POST["comment"]; ?></p> Goal is to store form submission within DB. Do I place a header linking the form to the other page (pro.php)? Ive tried input text which worked but the content disappeared when refreshed. Question: How to have form submit, store, and retrieve, and display successfully without refresh? Thank ya💙
×
×
  • Create New...