php

  1. Roy Harper

    JavaScript How does setInterval() affect the website's performance?

    I created a notification system in my website. In order to get the latest notifications like someone places, paid, or cancelled the order, I created a function and put it inside the setInterval(). My question is, does it somehow affect the performance of the website as it constantly downloading...
  2. Roy Harper

    PHP Alternative way to handle records filter in PHP

    I have a product page which has filters like search, category, and sort by (name, price). And my code goes like this. if(isset($_GET['category'])){ $products = $cakeOrdering->get_data("SELECT productID, prod_name, price, image FROM products WHERE categoryID = ? ORDER BY productID DESC LIMIT...
  3. Kaworu

    PHP I can’t read a file in a browser

    Hi! I have a problem with my PHP code. The other PHP file I have takes info from some data (about orders in a web-shop) and writes it in a text file – this is working fine. What I wanna achieve with this code is to read it in my browser window, so people who will visit this site can have an...
  4. CarlEOgden

    PHP Converting from a string to a date

    Hi, I've got an atom formatted date (apparently)! "created_date_time" => "2021-07-09T12:59:47.1630000Z" Can someone point me in the best way to split it int Date/Time and in UK format? I can split by T, split [0] by -, split [1] by . to remove right hand side and then I get 09/07/2021...
  5. Kaworu

    PHP Fopen() unexpected end of file error

    My problem Hello! I am learning how to code in PHP. I created a simple page that is simulating a car parts store. I encountered some error after opening a file and checking if it is working. What surprises me most is the fact, that PHP is telling me of some kind of “unexpected end of file...
  6. CarlEOgden

    PHP Incorporating Docusign into Laravel/VueJS website

    Hi Thanks for any help/advise given in advance. I will try to explain my environment so you have an idea of how to recommend or help my situation. Our website is used by estate agents, we now want to integrate Docusign so that agents can sign up to Docusign and send their customers contracts...
  7. J

    PHP Can't pass a value through session

    If I pass the string trough session it perfectly works <?php session_start(); $_SESSION["firstname"] = "Peter"; $_SESSION["lastname"] = "Parker"; ?> <?php session_start(); echo 'Hi, ' . $_SESSION["firstname"] . ' ' . $_SESSION["lastname"]; ?> But if I pass a value inserted into the form...
  8. Alma_99

    PHP Ajax on php Website

    Hello, I have several webpages on each there is a test with multiple choice questions. As nothing changes on the page except the questions, we decided to use Ajax to render the questions on the page. The problem is that the users can’t smoothly go through the questions to the end, i.e. there is...
  9. D

    PHP Having problem involving getting database content to show up after passing a query string.

    Hello, I have been stuck on this and figured I would come here to seek assistance. The main objective of this project is to create an intranet and have the employee name link to a details.php which displays details about that specific employee. the problem I am having is that whenever I click on...
  10. F

    Python Python HTTP Post to Apache

    Hello I have a super simple python script requesting to HTTP post to one of my web pages with PHP script. import requests url = 'https://domain.com/page.php' myobj = {'test': '1'} x = requests.post(url, data = myobj) print(x.text) Here is the code on the server side: <?php...
  11. D

    Disable hardware acceleration for Google Chrome - Website Video Background Issues

    I recently noticed that my website which uses a full screen video background with both (.mp4 and .webm) video formats is flashing a green screen when the user clicks away from the homepage on Google Chrome browser only. (Everything works perfectly on Mozilla Firefox and IE edge) So, If the...
  12. Stewpid

    PHP Forum Code I Need Help

    Yo I am new to PHP and I hate to pull a code-kitty but does anyone have the code for a basic working forum?
  13. Alien10

    PHP HTML form redirecting when it is not meant to

    I know how to use stripe now, but when I am integrating it into my website, the form takes me to index.php. Here is my code for my checkout.php: <?php session_start(); if (!isset($_SESSION['letin'])) { header('Location: index.php'); exit(); } else { if...
  14. Alien10

    PHP Received unknown parameter: name error in stripe php

    I am getting this error with stripe in PHP: Fatal error: Uncaught (Status 400) (Request req_FcC4lDxNQOV5mV) Received unknown parameter: name thrown in C:\xampp\htdocs\subscription-use-cases\medium\vendor\stripe\stripe-php\lib\Exception\ApiErrorException.php on line 38 Here is my HTML code...
  15. Alien10

    PHP error communicating with Stripe. (Network error [errno 55]: Failed sending HTTP POST request) error with stripe php

    I am getting an error in php when using stripe, Here is the error: Fatal error: Uncaught Unexpected error communicating with Stripe. If this problem persists, let us know at [email protected]. (Network error [errno 55]: Failed sending HTTP POST request) thrown in...
  16. D

    PHP WebBox - Beta Thread

    Hey everyone. Today is officially the day that my Organization, Oxygen-Software, launches the first ever Version of it's first piece of Software, WebBox! This Thread that you're currently on right now is a Beta-Thread. That's because right now, WebBox is still in it's early stages of...
  17. Ghost

    PHP Phone Validation / Look Up

    I created a small class/script that handles validating phone numbers through an API. It's quite simple to use & it just outputs some data. It is not 100% accurate because sometimes it will get the carrier or location wrong, but it can definitely figure out if a phone number is in the correct...
  18. D

    How To Install And Set-Up The LAMP Stack?

    Hey there. I've recently switched my Computer over to GNU/Linux Mint. And so, if I want to do any sort of PHP or Database work(Mainly for WebWareBox), I need to set-up the LAMP Stack. But the thing is, I've looked for tutorials and I can't seem to find any good one. Either that or I'm not...
  19. Ghost

    PHP Create Secure PHP Dashboard From Scratch Tutorial

    Hello everyone! Today I will be sharing a super simple tutorial on how to create an administrator or user dashboard with a login page & logout function. This can be used for anything, but today we will only be focusing on the permission system to keep you logged in. It won't be the most secure...
  20. Ghost

    PHP How to Create a Basic PHP Class

    In this tutorial you will learn how to create a simple PHP class. Classes are used for many reasons, including but not limited to the following: Re-usability through the core system Organization Easier to manage long-term due to data (ex: user profile info) going through a defined class / set...
Top Bottom