Search results

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

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

    your welcome i pleasured as my suggestion worked and solved your problem thanks fro your feedback. Best Regard Danish Hafeez | QA Assistant ICTInnovations
  5. 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> " ...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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"...
  11. D

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

    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...
  12. 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()...
  13. 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
  14. D

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

    The error message you're encountering suggests that the script is unable to locate the file orig.jpeg in the specified directory. You can add some debugging statements in your PHP code to output the path being used and verify if it matches the expected path. <?php $filePath =...
  15. D

    javascript variable to php variable

    you'll need to modify your code to use JavaScript to send the entered value to the server-side PHP script. Here's how you can do it: <?php if(isset($_GET['comp_no'])) { $complaint_no=$_GET['comp_no']; ?> <script> function myFunction() { var person = prompt("Enter your name","John...
  16. D

    Auto-completing HTML attributes and classes

    It seems like you're encountering issues with Emmet abbreviation expansion and CSS styling within PHP files in Visual Studio Code. Here are some steps you can take to troubleshoot and potentially resolve these issues: "emmet.includeLanguages": { "php": "html" }
  17. D

    Request help with smtp

    you are trying to send an email using PHP's PEAR Mail package and SMTP. However, there are a few issues in your code. Firstly, you need to make sure that the Mail package is properly included in your script. You can include it like this: require_once "Mail.php"; Make sure you have the Mail...