Jump to content
#FlattenTheCurve ×


  1. ginerjm



    • Points


    • Content Count


  2. requinix



    • Points


    • Content Count


  3. Barand



    • Points


    • Content Count


  4. gizmola



    • Points


    • Content Count


Popular Content

Showing content with the highest reputation since 04/01/2020 in all areas

  1. 1 point
    I thought I would present a modern solution based on Barand's that uses css grid. Same basic idea however, you need to replace the test output with your output loop. index.php <?php $output = ''; for ($i=1; $i<=28; $i++) { $output .= "<div class='entry'>Entry $i</div>\n"; } ?> <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="https://unpkg.com/purecss@1.0.1/build/base-min.css"> <link rel="stylesheet" type="text/css" href="styles.css"> <title>Grid Layout</title> </head> <body> <h1>CSS Grid Table</h1> <div class="grid"> <?= $output ?> </div> </body> </html> styles.css body { margin: 1em; } .grid { display: grid; padding 1em; grid-template-columns: repeat(5, 1fr); grid-column-gap: 1em; grid-row-gap: 1em; /* Start at 100px height, stretch if content in a cell exceeds the 100px; */ grid-auto-rows: minmax(100px, auto); } .entry { background: #eee; padding: 1em; } Here's the rendered html and css moved to a codepen if you want to experiment.
  2. 1 point
    Yes that is what I want This is the way i would like to do it how would i put in the select query into the code?
  3. 1 point
    It's much easier with CSS and divs than it is with a table. <?php $output = ''; for ($i=1; $i<=28; $i++) { $output .= "<div class='db-entry'>Entry $i</div>\n"; } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-language" content="en"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Example</title> </head> <style type="text/css"> .db-entry { width: 18%; height: 50px; padding: 20px 2px; border: 1px solid gray; margin: 0 2px 2px 0; float: left; } </style> <body> <?=$output?> </body> </html>
  4. 1 point
    Because you should always work with yyyy-mm-dd format in your database (column type DATE) If you always want to insert the current date, use VALUES ('$oracleid','$name','$des',CURDATE(),'$username', '$pass','$isadmin') EDIT: and use prepared statements!
  5. 1 point
    I think that was ginerjm is trying to say is that this may not be the easiest thing in the world for you, but even though there are some people here who don't know stuff like jQuery very well, I know we can help you out in one way or another. I'm sure he wasn't trying to gate-keep the world of software development and say that you had to give up. Right, ginerjm? What I mean is that we don't know anything about your code short of what you can post here and tell us about. As people who have never seen it before, you automatically know more about it (as a whole) than we do. It's not exactly like we can just jump right into the middle of all this and tell you exactly what needs to happen. It's good to know it works somewhere, but if you need help getting it to work someplace it does not then it'd be more helpful if we knew more about that, right? The PHP code is simple enough so any problem is likely to be with the Javascript side. Any errors in the browser console? And the general troubleshooting questions apply: what is it supposed to be doing and what is it actually doing?
  6. 1 point
    Maybe something like this. I cannot guarantee the code as we don't know what you have now or what the correct format is. But it should give you something to work on. $n = 0; $query = []; foreach($complete_req as $myItem ){ $query['request'][$n]['_kf_personnel'] = $_POST['uid']; $query['request'][$n]['_kf_requirementP'] = $complete_req[$n]; $n = $n + 1; }
  7. 1 point
    Well - how ARE you doing the delete? A PHP script, no? So use a form with a submit button and not a <button> and call the script that does the delete.
  8. 1 point
    No, you can't get those two either. The MAC address is only available at a very low level in the system and it only tells you the hardware on the other end of the ethernet cable. The computer name is not something that gets sent over the internet.
  9. 1 point
    You want to know if the server can download an EXE to the user's computer and run it, without them knowing? Think about what you're asking. I'm sure you can come up with the correct answer.
  10. 1 point
    Okay, that's what I thought. You cannot read registry settings from the client browsing the website. You can only access the registry from the server PHP is itself running on. And obviously only if it's a Windows machine.
  11. 1 point
    And if you search the php manual for that function name what do you find? Doesn't show up in mine. Is this some package that has to be specifically included into your php install?
  12. 1 point
  13. 1 point
    Can you show us some of your fpdf code? Just a sample of 20-30 lines from one of your routines that generates the pdf file? Just want to make sure of something since I'm still trying to help you.
  14. 1 point
    And WHAT IS that message? That's what I was asking you. You don't need an IDE to read a message in your browser. Or - if the functions themselves capture the messages the documentation for them should tell you how to display them during execution.
  15. 1 point
    Assuming that you have written the code correctly and not made any typos, what is the problem with it? You aren't having success - so are there any messages coming back? For you to say it doesn't work sure can't help us to see what's wrong, assuming that it is written correctly.
  16. 1 point
    Your randomNr array contains 10 elements so foreach($randomNr as $number) will give 10 columns. You need to pick a random 6 numbers out of the 10. Separate the php code from the html. Use CSS for styling the output. Example <?php $randomNr = range(0,9); $bingokaart = display($randomNr); function display ($arr) { $result = ""; for ($row = 1; $row < 7; ++$row) { $rand6 = array_rand($arr, 6); $result .= '<tr>'; foreach ($rand6 as $n) { $result .= "<td>$row$arr[$n]</td>"; } $result .= "</tr>\n"; } return $result; } ?> <!DOCTYPE html> <html> <head> <title>Sample</title> <style type="text/css"> table { border-collapse: collapse; } td { padding: 2px; } </style> </head> <body> <table border='1'> <?= $bingokaart ?> </table> </body> </html>
  17. 1 point
    Okay. Are you still getting the undefined index warning from that details.php?id=20597 page?
  18. 1 point
  19. 1 point
    Read a SQL manual for the functions available to be used in a query. Research! Feeling magnanimous - here: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_month
  20. 1 point
    From the code you presented - yes it is that simple.
  21. 1 point
    I don't understand what this means: "seems to be random the course it selects " What is the problem?
  22. 1 point
    You should NOT EVER store any kind of hint to a password. Once the user has logged in with his/her password all you need is perhaps the username and a token (maybe). You never need the pswd again.
  23. 1 point
    Check the documentation for setcookie().
  24. 1 point
    How about something altogether simpler and more user-friendly: <a href='www.11.com'>ABC</a> <a href='www.22.com'>ZXC</a> <a href='www.33.com'>CCC</a> No need for "error messages" at all. Only give the Users options for things that they're allowed to do. "What's the best way to prevent someone from shooting themselves in the foot? Don't give them a gun in the first place!" Regards, Phill W.
  25. 1 point
    andSelf was deprecated back in 1.8. That was a number of years ago. Your book may be slightly out of date. As for this thread, leave it. It's fine. Maybe someone else will find it on Google and your follow-up will answer their problem.
This leaderboard is set to New York/GMT-04:00
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
  • 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.