Search results

  1. 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...
  2. 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...
  3. 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
  4. D

    Template page help

    your welcome! Thanks you for your feedback Best Regard Danish hafeez | QA Assistant ICTInnovations
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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
  12. 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> " ...
  13. 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...
  14. 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...
  15. D

    Nested loops and SQL data

    To achieve your goal of performing a nested loop based on SQL data in PHP, you can use a while loop to iterate over each trainer's records and then use another loop inside to perform a count of certain fields for each trainer. check following modified/example code: $CTOQuery = "SELECT * FROM...
  16. D

    I'm just getting started with php and i'm having some issues

    Firstly, for a more secure way of handling passwords, you should consider using PHP's password hashing functions. Storing passwords in plaintext is not recommended due to security risks. Here's how you can modify your code to achieve the desired behavior: Password Verification Page...
  17. D

    issues with me website ( i am a php beginner )

    To achieve the behavior you want, where users cannot access the page without providing the correct password, you can use sessions to keep track of whether the user has entered the correct password. Here's the modified code: On testingpage.php: <?php session_start(); $pass = "123456789"...
  18. D

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

    Yes, it seems like you're providing an incorrect file path. When you specify $filePath = "/web/uploads/orig.jpeg";, PHP interprets it as an absolute path starting from the root directory of your filesystem. In this case, it's trying to find the file at C:\web\uploads\orig.jpeg, which doesn't...
  19. D

    loading but not showing

    phpinfo() & Extensions: Check if extension=mysqli & extension=pdo_mysql are enabled in the correct php.ini (use php --ini to find it). Restart your web server after enabling. PDO Connection: Ensure pdo_mysql is loaded (check phpinfo()). Move new PDO inside the try block. Use $dsn->prepare()...
  20. D

    Wordpress search engine (searchwp)

    Ensure that the page ID 16599 corresponds to the correct results page. Confirm that your permalink structure is set up correctly. Verify that there are no conflicts with other plugins or themes. Check if there are any error messages by enabling WP_DEBUG. i hope you will find it better
Back
Top