Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

php

  1. JosiahMaybe

    How to restrict access to PHP scripts to only be called from a single web site on same server?

    I know $_SERVER['HTTP_REFERER'] should be like my web page. I also would have dedicated IP and could check that address but can't someone have a duplicate or spoof that? If it helps, I would be using shared hosting from Asurahosting.com, Unlimited Plus plan. I have not made this site yet. I am...
  2. JosiahMaybe

    PHP How can I avoid lack of sending of purchases in PHP with email (mail(...))?

    Okay, so I can have unlimited email addresses, unlimited storage per each, and a set number of sends per hour per each. How do I make something that tests if an email was actually sent? I would be using in PHP that function called "mail" and sending a file along with it. I know how to send said...
  3. D

    PHP Simple powerful PHP library for data sanitization

    Hello, I've created a highly efficient and robust PHP library designed specifically for data sanitization. It combines simplicity with remarkable power, ensuring swift processing. This library empowers you to effortlessly sanitize diverse data types, eliminating the need for extensive manual...
  4. rajko

    PHP I dont know why my product isnt showing up in my shoppingcart when i press buy, btw i work with session variables

    this is my idfk.php i have markt the buy button. <?php session_start(); // Initialize the cart session if it hasn't been set if (!isset($_SESSION['cart'])) { $_SESSION['cart'] = array(); } // Check if the product ID is passed via GET request if (isset($_GET['productId'])) { $productId =...
  5. RealImmortal2004

    How do I redirect the webpage in the code below?

    I’ve tried using the code below but I’m stuck as to what I need to add to make it redirect. This is what I’ve got so far: <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { function get_data() { $name = $_POST['name']; $file_name='login-data'. '.json'...
  6. P

    Add a button on the single page product that add's the product to the cart with an amount of 0$

    I want to show a button in my single product page template that says "Try at home for free" under the product description and when you press the button it will add the product to the woocommerce cart with an amount of 0$. I'm using woocommerce with elementor. I have the following PHP code on...
  7. H

    would Firebase be good for making a forum/chatroom?

    i struggle with php, so i was thinking should i use firebase instead of mysql, or should i keep using mysql and use node.js instead of php
  8. S

    JavaScript Replacing Ace editor with summernote editor - 'Save' button

    Greetings, I'm working with an unsupported PHP/MySQL CMS that for some reason uses the Ace editor for adding/editing page content, and I'm trying to convert this over to use the summernote WYSIWYG editor. I've successfully replaced the editor, but unable to get the "Save" button to work because...
  9. N

    JavaScript Grid module conflict with top (sidebar) menu. how to fix?

    Hello friends I hope you are all well. I need a little help from you if you are familiar with CSS, PhP or Javascript. I needed a grid display component for my site, and after searching I found a suitable one and installed it. Now the problem is that after activating the module related to this...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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.
  15. 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...
  16. 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...
  17. Warner

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

    What is the difference between $message and $$message in PHP ?
  18. 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...
  19. 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...
  20. 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 ?
Back
Top Bottom