php

  1. dorianu

    Need advice with getting a paid product from an api

    I'm working on a wordpress site that has a bunch of forms. I need to send the submitted form data to an api, in return I get a product. The products are charged by credits that I have on a account. Before I request the product from the api, I have to charge the user. The checkout page is done on...
  2. Johna

    PHP Getting content from SQL database with PHP works fine until I add a for loop

    I'm trying to make a dynamic gallery page for a website. This code works fine: <?php $servername = "server"; $username = "username"; $password = "password"; $dbname = "dbname"; $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection...
  3. J

    Duplicate Rows on Multiple Tables w/ Linked Keys - SQL / PHP

    Hello All, Hoping someone with a little more experience than myself maybe able to help. I've been stuck on this issue with my code for months now, and it's started hurting my head thinking about it. Can anybody offer any guidance / advise / anything at all to help me on my way? ----- I'm...
  4. JRGN1

    PHP Difficulty of translating Python code to PHP

    I have just started to learn some programming as I was supposed to do a small web scraping project with Python. Now I was told that I cannot use Python, but should use PHP. So far I just know some Python basics and no other language. Thus, I am wondering if you think it were easier for me to...
  5. C

    PHP PHP good for blockchain development

    In order to learn blockchain development, here is how you can do it. You can learn almost everything about blockchain within only 2–3 months.
  6. Johna

    PHP rename() not working to move files

    I have a file called index.php (located in the root folder of the website) which creates a file called cat.php in the root folder of the website. <?php $title = "cat"; $image = "cat_pics"; $desc = "funny cat pictures"; $content = "<?php include '_data/head.php'; ?><title>" . $title . " | Crazy...
  7. fasjaweasc

    C++ C++ to PHP

    Hi! Can someone translate this code from c++ to php? #include <cstdio> #include <algorithm> #define REP(a,n) for (int a=0; a<(n); ++a) using namespace std; #define INF 1000000000 typedef long long LL; /////////////////////////// #define MAXN 1000000 int wagi[MAXN]; int orig[MAXN]; int...
  8. Warner

    PHP What is the difference between $message and $$message in PHP?

    What is the difference between $message and $$message in PHP ?
  9. 220061

    JavaScript jqeury why does my array not exist?

    Hello I'm trying to loop through my php array in jqeury but when I do that it days it doesn't exist. this is weird to me because I'm able to use the array to create an variable in jqeury. I need a loop that starts at the first date, and adds 1 day until it reaches the end date. the php code...
  10. 220061

    JavaScript datepicker disable dates that are in db

    Hello, Does anyone know how I can disable certain dates in my calendar based on the dates that are in the db?? so if the db has start_date (start_datum) 1-7-2022 and end_date (eind_datum) 3-7-2022. Then I want the code to disable all 3 of those days. code: <?php include "config.php"; ?> <html...
  11. Warner

    JavaScript Help Me To Copy Unicode

    Hi, I want to make some kind of tool which copy Unicode like this invisible character. CAN ANY BODY HELP ME ?
  12. P

    PHP How to change a normal dropdown to an auto populating dropdown on wooocomerce product page?

    I am working on setting up a woocommerce shop. We have a requirement where the customer would be able to choose a product and when a product is chosen, a subsequent dropdown would be populated with the variants of the products. When the variant is chosen the price would be displayed I am...
  13. Q

    PHP I am unable to upload data to PHP my admin

    <?php include 'header.php'; ?> <div class="jumbotron"> <h1>Add Your Hotel Details,<br> Welcome to <span style="color:green;">Kana Bachao M sign up 457</span></h1> <p class="pt-3" style="font-size: 21px;">Create an Account and add your Food</p> </div> <div class="container"> <div...
  14. 220061

    PHP calendar making booked days red

    hello! i'm making a calendar that shows which days have been booked and which are available. In my db I have two important cols for this called: start_date and end_date (translation is start_datum and eind_datum) Now I'm trying to make the days that are booked have the red booked label. the...
  15. 220061

    PHP calendar in php

    I want to create a calendar in php but it's not working out so well I want to be able to make my < and > buttons work and change the date on top of the calendar with one month. but I I can't get it to work. right now the date on top of the calendar is 08-06-2022 and I don't know why this is the...
  16. 220061

    PHP Posting form to another page

    I don't understand what is going wrong here I have a form for my users called reservation.php this one (is supposed to ) goes to reservationback.php but I have been trying it and for some reason it goes to reservation.php?submit=submit why is this happening?? reservation.php this one is...
  17. Brandon3000

    PHP My Multi User Login System Won't Work

    I've been trying to make a multi user login system but when I try to log on it stays at the login page (index.php) page. What can I do? index.php <form method="post" class="form-horizontal"> <div class="form-group"> <label class="col-sm-3 control-label">Email</label> <div...
  18. Y

    Why my new website domain sometimes directed me to the old webpage

    I have a website that was hosted in n*agahoster, which already expired (with active status) since our company didn't want to use the domain example.com and instead change the hosting place to a government's server which resulting to a new domain example.gov.xx The procedure was not hard, since...
  19. Z

    PHP CTF Help

    I'm new to programming, and I'm sorry if this is a really obvious question, which I think it is. I'm participating in a beginner CTF event, and I managed to find the following PHP code for a website: $firstChar = $_POST['filename'][0]; if (strcmp($firstChar, '/') == 0) { echo "Not...
  20. T

    PHP I need a PHP loop to enter a single text field's data and save the result from a web page.

    Hi, Quite new at php and it's usefulness. Needs: 0. i have an array of a BUNCH of zip codes that need to lookup their congressman; 1. go to this URL: https://ziplook.house.gov/zip/ziplook.html; 2. loops through the array and puts a zipcode into the field called "zip"; and then 3. presses...
Top