Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: PeDa
  • Order by date
  1. PeDa

    Media query: display = none/inline/block

    Solved: function showM() { const collection = document.getElementsByClassName("m"); if (screen.width>610) { for (let i = 0; i < collection.length; i++) {collection[i].style.display="table-row";} } else { for (let i = 0; i < collection.length; i++)...
  2. PeDa

    Media query: display = none/inline/block

    I use a media query to set the two columns of my table under each other on mobile devices: @media screen and (max-width:610px) {td,tr {display:block;}} One row of the table contains two radio buttons to hide or show other rows (in class "m") in the table: <tr> <td>Geeft u machtiging?</td>...
  3. PeDa

    Basic Authentication fails to authenicate

    I am trying to protect a webpage with basic autentication, however (both on a local WAMP-server and on my providers server), I cannot get any authentication. Even with the following code which should, I assume, only check for the presence of any username, authentication is refused: <?php if...
  4. PeDa

    POST Content-lLength of ... bytes exceeds the limit of 8388608 bytes in Unknown on line 0

    Therefore I gather that there is no solution apart from telling the users not to upload large files as that will generate a fatal error.
  5. PeDa

    POST Content-lLength of ... bytes exceeds the limit of 8388608 bytes in Unknown on line 0

    I am uploading multiple photos, where I want to reject photos that are too big, using essentially: <form action='file_upload.php' method='POST' enctype='multipart/form-data'> <input type='file' name='files[]' multiple> </form> file_upload.php contains: foreach ($_FILES['files']['tmp_name']...
  6. PeDa

    Unwanted spaces in php HTML mail

    Aaaargh! That was it; in my haste to try your solution I failed to add the [highlight #F57900]header separator[/highlight] to the previously last, and now penultimate, header. It is now of course working. Thank you for your forbearance! PeterDa.
  7. PeDa

    Unwanted spaces in php HTML mail

    Thank you for this, but infortunately it yielded a mail full of ASCII. I did however subsequently find mail($to, $subject, wordwrap($t, 70), $headers); that solved this problem.
  8. PeDa

    Unwanted spaces in php HTML mail

    I am generating HTML mails using the following script: $to = '"xxxxxxxx" <' . EXCURSIE . '>'; $bcc = '"xxxxxxxx" <' . WEBMASTER . '>'; $from = '"xxxxxxxx" <' . EXCURSIE . '>'; $subject = 'XXXXXXX: Inschrijving'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html...
  9. PeDa

    CSS two level horizontal menu

    I am trying to adapt a menu found on internet to this page. My problem is that the second level menu occupies the whole screen width, and not just the constrained width of the first level. Playing with the css properties of the subnav-content class (see below) has not yeilded me anything...
  10. PeDa

    Try catch not catching

    Hello Feherke, Yes, that did the trick. One again: many thanks, Peter Da.
  11. PeDa

    Try catch not catching

    Thank you for this, which I understand. I now have the following code (now with original Dutch text) $result = $q->fetchAll(PDO::FETCH_ASSOC); $aantalEvenementen=count($result); $aantalRijen=ceil($aantalEvenementen/4); $evenement=0; set_error_handler(function($errno, $errstr, $errfile...
  12. PeDa

    Try catch not catching

    Line 61 must give an array of filesnames of the form /impressie/yyyymmdd.*a.* and load the first one into $thumbnail (and this is what indeeed happens if such files exist, the normal condition). If no such files exist the error message is indeed correct; however my question is: why is this not...
  13. PeDa

    Try catch not catching

    I read dates from a table and show a thumbnail and link for each date. The thumbnails are in folder /impressie/yyyymmdd/ . The following script works fine if the folders do exist. I want, however, to catch the case that the folder does not exist (that is to say: wrong date in table) $result =...
  14. PeDa

    Report invalid characters in string

    Hello Feherke, Thank you very much for this - just what I needed. Thanks also for the style tips; my little fund of PHP-knowledge just keeps growing! PeterDa.
  15. PeDa

    Report invalid characters in string

    I have a form that validates each field with code like $err=''; if (empty($input['surname'])) {$err=$err . "&bull; Surname is missing<br>";} else{if (!preg_match("/^[\p{L}. '-]*$/u",$input['surname'])) {$err = $err . "&bull; Surname is invalid<br>";}} then checking if $err is still empty. I...
  16. PeDa

    prepend row to two dimensional array

    Hello Feherke, Yes, that did the trick! Thank you very much. -Peter D.
  17. PeDa

    prepend row to two dimensional array

    Thank you; however I only see the $data array. Perhaps my description was misleiding, my actual script (version 8.1.5) is: require_once('../includes/SimpleXLSXGen.php'); try {$db = new PDO("mysql:host=".HOST.";dbname=".DBNAME, USER, PASS);} catch(PDOException $e) {exit("Geen verbinding met...
  18. PeDa

    prepend row to two dimensional array

    I have a two dimensional array $data: [r1c1][r1c2][r1c3] [r2c1][r2c2][r2c3] [r3c1][r3c2][r3c3] [r4c1][r4c2][r4c3] How can I prepend a row $heads?: [r0c1][r0c2][r0c3] P.S. The reason I am doing this is to submit the resultant array to SimpleXLSXGen
  19. PeDa

    unwanted spaces inserted into the middle of php-generated html email body

    Yes indeed! solved; thank you very much (note to self: in future read the documentation right down to the bottom)
  20. PeDa

    unwanted spaces inserted into the middle of php-generated html email body

    I am generating a HTML e-mail containing a table with php 7.4. If my table contains a limited number of records (say 10) everything works fine (in Microsoft Outlook) , but with longer tables a space is periodically (about ever 1200 characters - very rough estimate) inserted into the html of the...

Part and Inventory Search

Back
Top