Jump to content

Sunamena

Members
  • Posts

    85
  • Joined

  • Last visited

Posts posted by Sunamena

  1. Hello. I want a diagonal border.



    Starting from

     

     

     

     

    HERE HERE

     

    \ CONTENT /

    TO HERE TO HERE

     

     

    So the math:
    Top: 0% (first here) 100% (second here)
    Bottom: 10% (first to here) 90% (second to here).


    In short i want to achieve this.

     

     

    SHORT HTML
    <div id="ONE">

    CONTENT
    </div>

    <div id="TWO">
    CONTENT
    </div>



    SHORT CSS

    #ONE {
    width: 100%;
    border: 2px solid black;
    }

     

    #TWO {
    width: 80%;

    margin:auto;
    }

     

     

     

     

     

     

     

    So, i want div ONE to have a diagonal line towards div TWO. I have been trying and looking on Google, but did not find a solution to this problem.



    Thanks in advance. =D

  2. I can't find the relation between the code you've shown and the question you're asking. There isn't a form tag or form processing code.

     

    A session variable shouldn't be necessary if you have one form for each item. Just add the ID as a hidden input. <input type="hidden" name="zoekertjesid" value="<?php echo $zoekertjesid; ?>">

     

    You should leave the form action attribute empty rather than using PHP_SELF, then it will preserve query string values and you can use $_GET to find out which ID is being used.

     

     

    There are no form elements involved.

     

    It is a hyperlink ( <a href="meerInfo.php?zoekertjesid=<?php echo $zoekertjesid; ?>">Meer info</a> ). When someone clicks it, the variable $zoekertjesid should be added to the $_SESSION['zoekertjesid'].

     

     

     

    The page where you are directed to, gives product specifications.

     

    The Session starts like this:

     

    <?php
    session_start();
    include "dbconnectie.php";
    if(!empty($_SESSION["gebruikersid"])){
    // TEST echo "Welkom " . $_SESSION["gebruikersnaam"] . "<br>";
    // TEST echo "<a href='afmelden.php'>Afmelden</a>";
    }
    else {
    header("Location: error.php");
    }
    $maakZoekertjesID = $_SERVER['QUERY_STRING'];
    $_SESSION['zoekertjesid'] = preg_replace("/[^0-9,.]/", "", $maakZoekertjesID);
    ?>
    The green text is how i currently put the "zoekertjesid" into the $_SESSION.
    This works, but when completing this form:
    <h5>Doe een bod</h5>
    <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <p>
    <label for="bod">Uw bod: </label>
    <input type="number" name="bod">
    </p>
    <p>
    <input type="submit" value="Verzenden" name="submit"> </p>
    </form>
    <?php
    /*
    if(isset($_POST["submit"])) {
    $sql = "INSERT INTO gastenboek (zoekertjesid, gebruikersid, bod, datum) VALUES (:zoekertjesid, :gebruikersid, :bod, :datum)";
    $stmt = $db -> prepare($sql);
    $stmt -> bindParam(':zoekertjesid', $zoekertjesidbod, PDO::PARAM_STR);
    $stmt -> bindParam(':gebruikersid', $gebruikersidbod, PDO::PARAM_STR);
    $stmt -> bindParam(':bod', $bod, PDO::PARAM_STR);
    $stmt -> bindParam(':datum', $datum, PDO::PARAM_STR);
    $zoekertjesidbod = $_SESSION['zoekertjesid'];
    $gebruikersidbod = $_SESSION['gebruikersid'];
    $bod = htmlentities($_POST['bod']);
    $datum = date("Y-m-d");
    $stmt -> execute();
    }
    */
    It gives errors (since it updates the URL, and the zoekertjesid, thus not finding your product)
    I hope my question is now a little more clear =D

     

    And thankyou so much for always supporting and helping me and other people on this forum! =D

    I think you would be a great teacher.

  3. Greetings all,

    What i want to achieve is the following:
    - Visitors are browsing products. Each product has an unique ID.
    - When a visitor wants more info on a product, he or she clicks on it and sees more information about the product. The ID of the product must be saved in the SESSION.

    I did this as shown below. I used part of the URL (since the ID is a number, i cut all the non number characters). This worked perfectly fine, untill i use a form (this one:

    <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

    )

    on that page.

    Idealy i would love to have an onclick:<?php $_SESSION['zoekertjesid'] = $zoekertjesid ?>, which i would then implement in my foreach code.
    I tried this, but all it did was making my SESSION ID and the content i received that of the last ID generated (because the on click is done AFTER the foreach is completely finished.

    I would apreciate it very much if i can get some advise here.


    Below you can see the relevant code (i left out the parts of the pages that i deemed irrelevant).

     

     

    Page "zoeken"

     

    foreach ($result as $row) {
    // Declareren van variabelen, dit gaat mijn werk wat vergemakkelijken
    $zoekertjesid = $row['zoekertjesid'];
    $gebruikersid = $row['gebruikersid'];
    $titel = $row['titel'];
    $omschrijving = $row['omschrijving'];
    $rubriek = $row['rubriek'];
    $prijs = $row['prijs'];
    $aantalAfbeeldingen = $row['aantalAfbeeldingen'];
    ?>
    <div class="productdetails">
    <h2 class="titel"><?php echo $titel ?></h2>
    <div>
    <img src="images/<?php echo $zoekertjesid; ?>/thumbs/thumb_<?php echo $zoekertjesid; ?>_1.jpg">
    <h5>Omschrijving</h5>
    <p><?php echo $omschrijving ?></p>
    <h5>Vraagprijs</h5>
    <p><?php echo $prijs ?> EUR</p>
    <p>
    <a href="meerInfo.php?zoekertjesid=<?php echo $zoekertjesid; ?>">Meer info</a>
    </p>
    </div>
    </div>
    <?php
    }



    Page "meerinfo"
    <?php
    session_start();
    include "dbconnectie.php";
    if(!empty($_SESSION["gebruikersid"])){
    // TEST echo "Welkom " . $_SESSION["gebruikersnaam"] . "<br>";
    // TEST echo "<a href='afmelden.php'>Afmelden</a>";
    }
    else {
    header("Location: error.php");
    }
    // TEST print_r($_SERVER);
    // TEST echo "<br><br><br>" . $_SERVER['QUERY_STRING'];
    $maakZoekertjesID = $_SERVER['QUERY_STRING'];
    $_SESSION['zoekertjesid'] = preg_replace("/[^0-9,.]/", "", $maakZoekertjesID);
    //TEST echo "<br><br><br>". $_SESSION['zoekertjesid'];
    ?>

     

  4. I am following a Business Management Course and it are general tasks for everyone (wether your going to open a shop, or start as a webdevelopper, the tasks are the same, making it a little hard for webdevelopment).


    I have found an alternative. I have looked at how many websites existed from year to year, and how many internet users are out there.

    I know the average household will not spend anything on web development. We have an entire list with what the average household spended on videogames, even creating applications. And purchasing Go-Karts.
    Long story short.

    Total money spend on webdeveloppers / households = what i needed.
    But the alternative will suffice ;).


    Thanks anyway =D

  5. An exact number, or a well tought gues by you webdeveloppers for the following: how much money does an average household spend on Webdeveloppers.

    Here is an example:

    Year How much the average household spend on bread

    2012 900

    2013 912

    2014 922

    2015 936


    As to see if the demand for webdeveloppers is increasing or decreasing. :)


    Thankyou

  6. Greetings,



    Question 1: I want a width of example: 70% on my viewport, resizing will not alter the wiidth. I tried 70vw, but this did not do the trick. How can i achieve this?

    Question 2: When my screen gets smaller, I want to change the % used on certain DIV widths, how can I achieve this?


    Thanks in advance =D

  7. Hello,

    I am tasked to look at how much the average person spends on a webdevelopper. And this for the last few months.
    Can someone give me exact numbers, or information based on their personal experiences.



    Thanks in advance! =D

  8. I placed a few orderd lists inside another orderd list to have a nested structure.
    On my screen, i have what i was going for and it works perfectly and works user friendly.

    However, HTML validator says I have a few errors (only on my nested list). I have cut down the code to sayd code.

    So how should i solve this problem?
    Is this an error inside the validator itself? Since it seems to be working perfectly.


    Kind regards =D



    Code:


     

     

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Title</title>
    </head>
    <body>
    <ol>
    <li><a href="#lijst1">Getting Started</a></li>
    <ol>
    <li><a href="#lijst11">Where to obtain crew skills?</a></li>
    <li><a href="#lijst12">Crew Window</a></li>
    </ol>
    <li><a href="#lijst2">Type of crew skills</a></li>
    <ol>
    <li><a href="#lijst21">Crafting skill</a></li>
    <ol>
    <li><a href="#lijst211">The crafting window</a></li>
    <li><a href="#lijst212">Companion at work</a></li>
    <li><a href="#lijst213">Assembly components / Bounded attachementsonent</a></li>
    <li><a href="#lijst214">Reverse engineering</a></li>
    <li><a href="#lijst215">Schematics</a></li>
    <li><a href="#lijst216">The crafting skills</a></li>
    </ol>
    <li><a href="#lijst22">Mission skills</a></li>
    <ol>
    <li><a href="#lijst221">The mission window</a></li>
    <li><a href="#lijst222">Companion at work</a></li>
    <li><a href="#lijst223">Mission Discoveries</a></li>
    <li><a href="#lijst224">The mission skills</a></li>
    </ol>
    <li><a href="#lijst23">Gathering skill</a></li>
    <ol>
    <li><a href="#lijst231">Missions</a></li>
    <li><a href="#lijst232">Resource nodes</a></li>
    <li><a href="#lijst233">The gathering skills</a></li>
    </ol>
    </ol>
    <li><a href="#lijst3">Companions</a></li>
    <li><a href="#lijst4">Non-subscriber guide</a></li>
    <ol>
    <li><a href="#lijst41">Free-to-play</a></li>
    <li><a href="#lijst42">Preferred players</a></li>
    </ol>
    <li><a href="#lijst5">Credits</a></li>
    </ol>
    </body>
    </html>

     

     

  9. I understand now.


    I now receive all of the data, and my biggest problem is solved.


    How wonderfull!


    New question: Can i make certain text bold in the message? (i tried <b></b> but it didn't work.

    Problem still existing: How to check with PHP if the "akkoord" checkbox is checked?

     

    Problem still existing: I can't find how to assign the senders e-mail adress as the sender.
    mail($myemail, $meetnaam, $message);
    Where do i fit in $email in that function? I always seem to get an error whenever i do so.

     

     

     

    Thanks in advance =D
    And thanks again for your beuatifull explaination! =D

  10. Hello everyone!

    This is my very first PHP document, and i must admit, i have no experience or knowledge about PHP, i looked at an example and tryd to connect the dots to create this one. It works better than expected, but I do encounter a few issues, where I would very much like to have some advise with.

    Problem 1: The data from the form gets mailed to me, but even though everything in the form is filled in, I would only receive the
    "E-mail: INPUT@HOTMAIL.COM"
    The rest of the data like:
    "Meetnaam: "
    Were blank, as if the data did not exist.
    The form did check correctly wether this information was provided, but seems not to provide so in the e-mail send to me.

    Problem 2: $meetnaam should be the subject of the e-mail.

    Problem 3: $email should also be the e-mail adress asigned to the sender, as such, I can easily reply.

     

    Problem 4: The checkbox, $akkoord, should be checked, if not, an error should be displayed, I do not know how to do this.

     

     

     

    Your help with this problem is very much apreciated! :good:
    Once again: I am new to this, so try to be very specific (if you would even be so kind, type it out and put the update in bold text) =D

     

    This is the PHP and HTML code I used respectively:



    PHP

     


    <?php
    /* Set e-mail recipient, WORKS */
    $myemail = "support@nimblefeather.com";
    /* Check all form inputs using check_input function, WORKS */
    $name = check_input($_POST['meetnaam'], "Voer de meet naam in.");
    $subject = check_input($_POST['meetadres'], "Voer het adres van de meet in.");
    $email = check_input($_POST['email']);
    /* If e-mail is not valid show error message, WORKS */
    if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
    {
    show_error("Het opgegeven e-mail adres is ongeldig.");
    }
    /* Let's prepare the message for the e-mail, ERROR */
    $message = "
    Naam van de meet: $meetnaam
    Organisator: $organisator
    Adres: $meetadres
    Binnen of buiten: $binbuit
    E-mail adres: $email
    Mag e-mail verschijnen op de website: $emailtonen
    Contact (telefoon): $telefoon
    Uren: $meeturen
    Bereikbaarheid met de trein: $trein
    Bereikbaarheid met de auto: $auto
    Andere informatie: $andereinfo
    Akkoord met de regels: $akkoord
    ";
    /* Send the message using mail() function, $myemail WORKS, $meetnaam should be the Topic but isn't, $message is displayed, yet only partly */
    mail($myemail, $meetnaam, $message);
    /* Redirect visitor to the thank you page, WORKS */
    header('Location: klaar.html');
    exit();
    /* Functions used, WORKS */
    function check_input($data, $problem='')
    {
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    if ($problem && strlen($data) == 0)
    {
    show_error($problem);
    }
    return $data;
    }
    function show_error($myError)
    {
    ?>
    <html>
    <body>
    <p>Oeps, verbeter alstublieft de volgende fout:</p>
    <strong><?php echo $myError; ?></strong>
    <p>Keer terug, en probeer het opnieuw.</p>
    </body>
    </html>
    <?php
    exit();
    }
    ?>

     

     

     

     

     

     

     

     

     

     

     

    HTML

     

     

     

     

     

     

    <form method="post" action="meetmailer.php">
    <div class="colformwrap">
    <div class="colformleft">
    Naam van de meet <span class="verplicht">*</span>:
    </div><!--
    --><div class="colformright">
    <input type="text" name="meetnaam" maxlength="50">
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Naam van de organisatie of organisator:
    </div><!--
    --><div class="colformright">
    <input type="text" name="organisator" maxlength="50">
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Adres van de meet <span class="verplicht">*</span>:
    </div><!--
    --><div class="colformright">
    <input type="text" name="meetadres" maxlength="50">
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Is de meet binnen of buiten?
    </div><!--
    --><div class="colformright">
    <select name="binbuit">
    <option value="Buiten">Buiten</option>
    <option value="Binnen">Binnen</option>
    <option value="Binnen en Buiten">Binnen en Buiten</option>
    </select>
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Contact (e-mail adres) <span class="verplicht">*</span>:
    </div><!--
    --><div class="colformright">
    <input type="text" name="email" maxlength="50">
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Mag dit e-mail adres op de website verschijnen?
    </div><!--
    --><div class="colformright">
    <input class="bolleke" type="radio" name="emailtonen" value="0" checked> Neen <input class="bolleke" type="radio" name="emailtonen" value="1"> Ja
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Contact (telefoon):
    </div><!--
    --><div class="colformright">
    <input type="text" name="telefoon" maxlength="50">
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Uren:
    </div><!--
    --><div class="colformright">
    <input type="text" name="meeturen" maxlength="50">
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Bereikbaarheid met de trein:
    </div><!--
    --><div class="colformright">
    <textarea name="trein" maxlength="5000"></textarea>
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Bereikbaarheid met de auto:
    </div><!--
    --><div class="colformright">
    <textarea name="auto" maxlength="5000"></textarea>
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
    Andere informatie:
    </div><!--
    --><div class="colformright">
    <textarea name="andereinfo" maxlength="5000"></textarea>
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
     
    </div><!--
    --><div class="colformright">
    <input class="bolleke" type="checkbox" name="akkoord" value="0"> Ik heb de <a href="#">regels</a> gelezen en ga hiermee akkoord.
    </div>
    </div>
    <div class="colformwrap">
    <div class="colformleft">
     
    </div><!--
    --><div class="colformright">
    <input class="verstuurknop" type="submit" value="Verzenden">
    </div>
    </div>
    </form>

     

     

     

     

  11. Hey there.

     

     

     

    I was wondering if this is possible. This is what i want to achieve on my page (within a div or within a body).

     

     

    first 15%: color:gray

    center 70%: color:white

    last 15%: color:gray

     

     

     

    Is this possible? How can one achieve this?

    Thanks in advance =D

  12. I want a very simple click button.

     

     

    When clicking on button One (in the example below i used a list element, not sure if this is the correct code to use for this)., Div "one" should be "display : block; " and Div "two" should be "display : none; " and vice-versa.

    Having no Javascript experience yet, but needing this small part of code (if it is in fact JavaScript), can anyone or help me with this?

     

     

     

    Kind regards =D

     

     

     

     

     

     

    <div id="wrapper">
    <nav class="buttons">
    <ul>
    <li>ONE</li>
    <li><TWO</li>
    </ul>
    </nav>
    <div id="one">
    <p>TEXT</p>
    </div>
    <div id="two">
    <p>TEXT</p>
    </div>
    </div>
  13. I don't know how to do this and maybe you guys know how to do this.


    I want to have the following:


    <p>
    Hello, I am an Example.
    </p>


    When someone hovers over Example, it has a box appearing on top of it (just like <abbr> would, but <abbr> should be used for words like: AFK, LOL, HTML,...). So how do I make that happen and how do i style the box correctly?



    This is what I have in mind for the box:

    CSS
    width:100px;
    height:auto;
    background-color:rgba(255,255,255,0.8);
    border:2px solid rgba(0,0,0,0.8);
    border-radius:15px;
    padding:5px;

     

     

     

     

     

    So how do I make that box appear? (it should appear next to your mouse cursor)



    Thanks in advance =D

  14. 1) You don't require 100% width on #navbar, by default it will fill the space available to it.

    2) I don't know why you have left margin as you have.

    3) If number of menu div widths equals 100%, adding borders the width will be 100% + 10 x border width result in the last menu div stacking below the others.

     

     

    1. Thanks, I have learned something new =3

    2. I have removed the margin =3

    3. When i try to add a border, and give a % number, it does not show any borders.

     

    Either way, my lessons webdesign started again =D

     

    We will go deeper this half year on positioning elements and DIVs =3

     

     

    But this forum has realy been a big help in my learning proces =D

  15. Hey, I have been googeling, and trying to achieve this with Div's:


    1 2 3 4 5


    But instead i get:


    1 2
    3
    4
    5



    What am I doing wrong?



    HTML code (i do have images, but i left out that part of the code)

    <div id="navbar">
    <div id="work">
    <img ...>
    </div>
    <div id="about">
    <img ...>
    </div>
    <div id="foto">
    <img ...>
    </div>
    <div id="language">
    <img ...>
    </div>
    <div id="contact">
    <img ...>
    </div>
    </div>
    CSS code
    #navbar {width:100%;
    background-color:rgba(255,255,255,0);
    }
    #work {width:15%;
    float:left;
    }
    #about {margin-left:15%;
    width:15%;
    }
    #foto {margin-left:30%;
    width:40%;
    }
    #language {margin-left:70%;
    width:15%;
    }
    #contact {margin-left:85%;
    width:15%;
    }














    Thanks in advance =D

     

  16. HTML
    <div id="wrapper">
    <div id="leftone">
    CONTENT
    </div>
    <div id="rightone">
    CONTENT
    </div>
    </div>



    CSS

    #wrapper {width:100%;
    }

    #leftone {width:50%;
    }

    #rightone {width:50%;
    float:right;
    }

     

     

     

     

    I think that is what you are looking for?

    Random

    I want to include something random by using php. How do i do this? I am very new to php.
    I will use it to display a random image, each has it's own unique url.

     

     

    Example:



    Hello, your lucky color is X.

     

     

     

    X is randomly chosen from a list and could be:

    Red
    Orange

    Green
    Blue
    Red
    Pink

     

     

    How would i do this?


    Thanks in advance =D

  17. Hello!


    I am quite new to CSS, and have learned much the past months, but I still have some things that trouble me and i struggle to find a sollution.
    I do work with div tags.

     

     

    Problem 1: At the right, you can see "New Comics" with an unorderd list consisting of two items at this moment. The date is "float: right". it shows good on my screen, and any other medium to large screen resolution, but once it gets to small, the date gets ON the border line.
    I tried: min-width:300px
    Result: It jumped UNDER the content that should be on the left of it.
    URL: http://www.nimblefeather.com/index.php


    Problem 2: The images here are floating right and left respectively. Again, on my screen, or any other large screen, there is no visible problem, but once you start resizing the screen, the text does no longer fit into the div's.
    I tried: min-width.
    Result: No visible change.
    URL: http://www.nimblefeather.com/comics.php

     

     

     

    Problem 3: When resizing the width of the comic images gets adjusted, but the height does not, resulting in well, a weird image. The height should also change accordingly. In addition, on smaller screens the word (heading1) Chapters sometimes sticks out of it's Div. How would this be solvable?
    URL: http://www.nimblefeather.com/comics/drawingshady/thefutureofsumarnya/chptr1.php


    Question: Is it possible to make the website appaer like on my screen on other resolutions as well? By simply "resizing it" to their resolution (example: My resolution: 800 x 600, and visitor X resolution 400 x 300, to let the CSS resize the page to 50%, including text and images,...?)




    Thanks in advance =D

  18. Hello everyone!

     

     

    How can I use HTML and CSS to have one image as a background for my body?
    It should not repeat, it should just be over the entire screen.



    Kind regards,

     

     

     

    Sunamena

  19. Greetings all, I have some issues with this HTML.


    HTML:

     

    <!doctype html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <ul class="headerul">
    <li><a href="#top">CANVAS</a></li>
    <li><a href="#top">kijk online</a></li>
    <li><a href="#top">programmagids</a></li>
    <ul class="floatright">
    <li><a href="#top">delen</a></li>
    <li><a href="#top">zoeken</a></li>
    </ul>
    </ul>
    </body>
    </html>



    Error code from w3C validator ():

    Error: Element ul not allowed as child of element ul in this context. (Suppressing further errors from this subtree.)

    From line 15, column 3; to line 15, column 25

    a></li> <ul class="floatright"> <

    Contexts in which element ul may be used: Where flow content is expected. Content model for element ul: Zero or more li and script-supporting elements.


    What I am trying to do: http://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_black_right

     

     

     

    So how to solve this problem? Part of what was requested was to use only propper HTML, with this validator not showing any errors. And those two items should be floating right. In addition, inline style is not allowed.
    Is it possible to solve this? Or to create a table for this?


    Thanks in Advance!

×
×
  • Create New...