Recent content by Danishhafeez

  1. D

    $_SESSION Issue

    Variable assignment in PHP File 1:In your code snippet, you're assigning the string '$dndid' to $_SESSION['$dndjobnumber'] instead of the value of $dndid. Also, you're enclosing '$dndid' in single quotes, which means it will be treated as a string literal rather than a variable. You should...
  2. D

    hide / protect credentials

    The best approach to hide and protect credentials in scripts involves utilizing environment variables or dedicated configuration files with restricted permissions. Alternatively, consider employing vaults or secrets managers for enhanced security, ensuring encryption for stored credentials if...
  3. D

    Tsp-solver web application with the ant colony optimization method

    Hello! Congratulations on creating your ACO application! That sounds like an interesting project. I'd be happy to help you with testing. Could you provide me with the necessary details to access the application? If you have a link to the video demo or any instructions for testing, that would be...
  4. D

    How to determine if we have php.net?

    The errors in your logs indicate a PHP application running on a Linux server, not tied to .NET. To check the PHP version, run php -v in the terminal. You can specify PHP 8.0 in your Dockerfile for containerization. Best Regard Danish Hafeez | QA Assistant ICTInnovations
  5. D

    Template page help

    your welcome! Thanks you for your feedback Best Regard Danish hafeez | QA Assistant ICTInnovations
  6. D

    Not seeing images

    File Paths: Ensure that the paths to the source and destination images are correct. In your example, you're using relative paths (web/uploads/orig.jpeg and web/uploads/thumb.jpeg). Double-check that these paths are correct relative to the location of your PHP files. <?php // example.php...
  7. D

    What would be the best way to make this code more readable, compact and maintainable?

    To make the code more readable, compact, and maintainable, you can apply several improvements // Get the first record from the query result $actualRecord = $query[0]; // Initialize variables $updateRequired = false; $sql = ''; $fieldsToUpdate = []; // Loop through all fields to check for...
  8. D

    PHP Mail working on one server, not another?

    It's plausible that the production server's hosting provider imposes restrictions on outgoing SMTP connections to prevent spam. Verify firewall settings for port 587 and test connectivity to Gmail's SMTP server using telnet or netcat. Ensure the production server has internet access and check...
  9. D

    Links in JS

    Both methods you've mentioned achieve the same result of redirecting the user to a different URL when the <span> element is clicked. However, there are slight differences between the two methods: window.location.href: This method changes the current location of the browser to the specified...
  10. D

    Template page help

    Your approach is generally correct, but the issue you're encountering is likely due to the order in which you're including the content within masterPage.php. Right now, you're including the content before both the header and footer. To fix this, you should include the content between the header...
  11. D

    List by ID in Order !!

    It seems like you want to renumber the IDs in your database table so that they are consecutive starting from 1. <?php echo "<table class='tabela_dados' border='1'> <tr> <td>ID</td> <td>Nome Empresa</td> <td>Responsável</td> <td>Telefone 1</td> <td>Telefone 2</td> <td>E-mail 1</td> <td>E-mail...
  12. D

    Warning: imagecreatefromjpeg(/web/uploads/orig.jpeg): failed to open stream: No such file or directory in C:\xamppNew\htdocs\photo\thumbimage.class.ph

    your welcome i pleasured as my suggestion worked and solved your problem thanks fro your feedback. Best Regard Danish Hafeez | QA Assistant ICTInnovations
  13. D

    Do not echo empty field from Mysql

    You can achieve this by incorporating the same logic you have in your PHP code that handles the display of the option_second field. Here's how you can modify your PHP code to achieve that: <?php if (trim($items['option_second']) != "") { echo "<strong>Option:</strong> " ...
  14. D

    embedding 2 short codes in one page breaks layout

    It seems like your issue is related to CSS and HTML structure when you're trying to embed multiple shortcodes on the same page. Looking at your code, I see that you're using absolute units (vw and vh) for sizing, which might not be ideal for responsive layouts, especially when you have multiple...
  15. D

    mail(to,subject,message,headers); Not Working. H E L P !

    Here's an updated version of your code that includes error handling and uses PHPMailer for sending emails (if SMTP configuration is required):<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; // Adjust the path to autoload.php as needed...
Back
Top