Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

php

  1. 220061

    PHP calculate total price based on quantity

    can I calculate the total price depending on the number that the user types into the input? so for example idk how to do this? this is my code. I have been looking around on the internet but they only gave me examples of how their shopping cart was looking. I don't want that I want ot be able...
  2. vesaldiy

    PHP Failed to showing nested dropdown list

    Hello friends, I've something to ask about coding codeigniter. I want to create a nested dropdown, but when on testing run it says "The results could not be loaded". So maybe is there something wrong with my typing, please help me. Here I show the code: <?php defined('BASEPATH') OR exit('No...
  3. skifli

    Python Feedback on a program I made.

    Hi CF, I would like to ask for feedback on a project of mine I made in Python & PHP. It is a program that allows you to wirelessly share files with other devices on your network. Any device that can access the webpage for the server can upload and downloads files. Github...
  4. Giscoding

    PHP Does anyone knows how to sort this out?

    Hi, I am having an issue with my site and it is driving me crazy for weeks now. My problem is simple yet I cannot find how to fix it. The issue is: In my Menu, all pages are set but when I click on the "Profile" page, it loads the "Home" page. What I have tried so far: -create a new menu and...
  5. 220061

    PHP prepared statements

    Hello I have been programming for a while now and the thing that I just can't seem to be able to understand is prepared statements. Don't get me wrong I understand why I have to use it. but I don't understand how in a project. Do any of you have some easy tutorials?
  6. 220061

    PHP password hash and verify help??

    Hello I'm trying to do a password_has and password verify for my project. I'm trying to make my project safer step by step. I have already put a pashword hash in my code and that works as you see: but I can't seem to get it to verify. it either says password incorrect or I can't login at all...
  7. C

    PHP Help with displaying search form when sub-category page appears

    Thanks for all the previous help. The web script that I'm trying to modify successfully allows for the ability to search the site by keyword, and filters results by category and by sub-category. I am trying to display a search form when sub-category page appears (as a first step in creating the...
  8. CarlEOgden

    PHP Microsoft Graph API - any experience? Specifically Calendar Create/Update/Delete events

    Hi If you've used and can help, I'd really appreciate it. Part of my code creates an appointment in our diary system, I've now implemented Microsoft login (using the Graph API) so I have a token. I can create an event (appointment) BUT the location doesn't show it as a true location even...
  9. Roy Harper

    PHP Generating unique txID or Using auto_increment in SQL

    I am just curious as to why others generate unique strings or ID for transactions or orders when they can just use the primary key in SQL. Is it recommended to generate id like this 111834039007163223, or is it okay to just use the primary key in SQL generated using auto_incement? I always see...
  10. Roy Harper

    PHP How to resize an image with fixed height but auto size the width in PHP?

    I created a function that resize an image. But I only want to define the target height and then auto size the width. For example if I have a 840x360. My target height is 250 and I want to auto compute the width to maintain it's ratio. So far I can only resize the image based on the resolution...
  11. E

    PHP Laravel fetch all checkboxes include checked from pivot table with additional column

    Hello, I'm trying to fetch all my checkboxes with additional column from pivot table. Model: Stock class Stock extends Model { public function products(){ return $this->belongsToMany('App\Product','products_stock')->withPivot('qtySpent')->withTimestamps(); } }...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Back
Top Bottom