38,023 Topics

Member Avatar for
Member Avatar for Stefce

I want to count and show live users counter on my page. My url structure looks like this `domain.com/miningbot?id=pool-v9w1x2y` The users which are inside the parameter should be counted, updated and displayed to the user. Also, the parameter can be changed. I have asked ChatGPT to write me some starting …

Member Avatar for Dani
0
602
Member Avatar for borobhaisab

Hiya, Which of these IF CONDITION codes are valid ? And can you rank the valid ones according to your choice by giving reasons to your choices ? Thanks! 1. ```` $conn = mysqli_connect("localhost","root","","buzz"); $sql = "INSERT into users (username,email) VALUES (?,?)"; if($stmt = mysqli_prepare($conn,$sql)) { mysqli_stmt_bind_param($stmt,"ss",$_POST[username'],$_POST['email']); if(!mysqli_stmt_execute($stmt)) //FIRST CHOICE …

Member Avatar for Dani
0
73
Member Avatar for borobhaisab

Hiya, Is this: ```` function unset_sessions() { //All Sessions on the script .... UNSET($_SESSION['registration_form_display']); UNSET($_SESSION['registration_form_button_clicked']); UNSET($_SESSION['domain']); //Form Input UNSET($_SESSION['domain_email_account']); //Form Input UNSET($_SESSION['domain_email']); //Form Input UNSET($_SESSION['password']); //Form Input UNSET($_SESSION['errors']); Displays errors underneath the form. echo __LINE__; echo '<br>';//DELETE } unset_sessions(); ```` the exact same as this: ```` session_destroy(); ```` I ask, …

Member Avatar for Dani
0
53
Member Avatar for Adolfo_1

Hi.. I would like to send an order confirmation email with the cart details. But it doesn't show the string in php, only html. My script: $to = 'adolph@site.it'; $subject = 'New Order'; $from = 'info@newsite.it'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // …

Member Avatar for Adolfo_1
1
48
Member Avatar for jmconsultants

I want to populate report in browser, i prepare this report in i-net clear report, and report file having extension of rpt. I also want to pass parameter

Member Avatar for rproffitt
0
57
Member Avatar for increase

I want to pass two variables in a php url at present I have $line = "<a href=\"$click?$namehref\"><font color='red'>$name</font> </a>"; When I click the link it displays the $click variable, but does not then pass to $namehref which is an mp3 link, what would the syntax be to achieve this.

Member Avatar for Dani
0
251
Member Avatar for Maycon_1

Hello guys, how are you all doing ? Guys there someone there, who is interested in building a project together ? to connect exchange ideas and knowledge

Member Avatar for john_111
0
88
Member Avatar for Stelian_1

Is there a way to get the data from an registration form by counting the inputs and textfields but excluding the submit and hidden ones? Lets say I have a form with 5 input fields that contains the data for registration can I make an array for all so when …

Member Avatar for Dani
0
63
Member Avatar for borobhaisab

Hello, I do not see $data defined, so what is it ? ```` function prepared_insert($conn, $table, $data) { $keys = array_keys($data); $keys = array_map('escape_mysql_identifier', $keys); $fields = implode(",", $keys); $table = escape_mysql_identifier($table); $placeholders = str_repeat('?,', count($keys) - 1) . '?'; $sql = "INSERT INTO $table ($fields) VALUES ($placeholders)"; prepared_query($conn, $sql, …

Member Avatar for Dani
0
22
Member Avatar for Stefce

I am having a problem passing a `$_POST[]` parameter to another file via the URL. Look at the line 34 and 138. The line 34 is getting the URL parameter in a POST and line 138 should pass that same parameter value to the other file, but i get an …

Member Avatar for Stefce
0
101
Member Avatar for borobhaisab

Howdy once more, Just got another question on Sql and Php Prepared Statement. How would you confirm a successful row insertion to a mysql table ? Which one of the following lines would you add the IF condition to in order to check insertion successful or not ? 1). mysqli_stmt_execute() …

Member Avatar for borobhaisab
0
96
Member Avatar for Stefce

I have this code <?php // Connect to the database $servername = "localhost"; $username = ""; $password = ""; $dbname = ""; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } // Get the user's IP address $user_r_ip …

Member Avatar for Dani
0
57
Member Avatar for David_140

I am not that much of an expert in PHP as it has been few months since I started playing with it. Currently I am working on creating a basic CRUD operation in PHP. I follow this tutorial on CRUD in PHP (https://www.cloudways.com/blog/execute-crud-in-mysql-php/ ) to create it on a local …

Member Avatar for Rose_17
0
486
Member Avatar for Abhinesh_1

I am making a edit blog option for a website. I am done with the code. Whenever i click the edit button it redirects to the form action file and shows a blank page. Here are my codes. # edit-blog.php # <?php include_once('header.php'); include_once('sidebar.php'); include_once('controller/BlogController.php'); $_SESSION['ap-old']['title'] = $_POST['title']; $_SESSION['ap-old']['short_description'] = …

Member Avatar for Stelian_1
0
104
Member Avatar for borobhaisab

Hi, Seem to be having problem with the password_hash() as it keeps changing the hash value of the same password. Why ? When each time I refresh the page, the $password_hashed value changes! Why ? The $password is still the same who's value is: '123'. And password_verify($password,$db_password) always echoes '1' …

Member Avatar for Biiim
0
241
Member Avatar for borobhaisab

Hello there, How to destroy session data when the browser closes ? Note, not dealing with $_COOKIES here. Thanks!

Member Avatar for Dani
0
39
Member Avatar for dot LI

Hi, With PHP 7.3, the following was used to grab content from another website: <?php include 'https://www.some-other-website.com/stuff.php';?> It works in PHP 7.3, but I get a black page in PHP 7.4 or higher. Any help would be appreciated. Thanks, Jim

Member Avatar for Dani
0
77
Member Avatar for Stelian_1

I'm not a php expert but I wonder if there is a way to secure the tunnel with https and if can somehow use some sort of certificate to the session from the class when it outputs the userdata into session and read it as an input by the class? …

Member Avatar for Dani
0
46
Member Avatar for sheeview

im trying to get PHP operate well with javascript. I have looked on internet and put all the solution inside at once but none work. I want to create a cross-site AJAX request but i cant seem to be able to have session_start() stick. I have this PHP code on …

Member Avatar for Stelian_1
1
320
Member Avatar for adshrest

PHP script that provides a basic web-page asking for a date. That date is then used to get the log file for that date from a directory containing many log files (one for each date). If the log file exists, then it is downloaded; otherwise, the script returns with "No …

Member Avatar for Dani
0
111
Member Avatar for Alisha_8

I have been doing web development with PHP for the last few years, and like a lot of people, I have a strong dislike for PHP. I also have done lots of Java development, but never web development. Having a good knowledge of Java, I decided I would try web …

Member Avatar for jwenting
0
101
Member Avatar for IQBAL_13

Thank you for looking at this problem, details are all below. Below is the code <form style="overflow: hidden;" method="post"> <input type="checkbox" aria-label="Checkbox for following text input" name="kursus[]" value="<?php echo $row['IDKursus']; ?>"> <div class="d-flex justify-content-between mt-3"> <button type="submit" class="btn btn-success" name="daftar_kursus">Daftar Kursus</button> <button type="reset" class="btn btn-primary">Reset</button> </div> </form> if (isset($_REQUEST['daftar_kursus'])) { …

Member Avatar for Dani
0
148
Member Avatar for IQBAL_13

I have a programming code problem, I need help to solve the problem. How to explode data array using MYSQL and using NOT IN. The program code is below <form style="overflow: hidden;" method="post"> <div class="table-responsive"> <?php $sql = "SELECT * FROM kursus WHERE KodKursus NOT IN (SELECT kursusList FROM pensyarahkursus …

Member Avatar for Dani
0
149
Member Avatar for Dkevinjames

How do I track the source of each user signup for B2B SaaS product? In other words, how do I check from which source the user landed on my website? I need to track for each individual user.

Member Avatar for Alisha_8
0
55
Member Avatar for Rico_2

hii, i want to ask how to loop this array for menu like in images public $list = [ [ 'id' => 'dashboard', 'text' => 'Dashboard', 'icon' => 'feather-home', ], [ 'id' => 'data_tables', 'text' => 'DataTables', 'icon' => 'feather-layers', 'children' => [ ['id' => 'basic', "text" => "Basic"], ['id' …

Member Avatar for AndrisP
0
123
Member Avatar for borobhaisab

Hello Php Programmers, I want to open iframes, more than one, to some of my webpages from other webpages. What do I need to be careful off so no crook injects anything malicious on my site or on my visitors' clientsides ? Q1. Which of these attributes, mentioned in the …

Member Avatar for Dani
0
211
Member Avatar for R_850

Hi, first of all let me thank anyone willing to help out with this. Jquery / Ajax update Span or Div by ID without refreshing page <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="60"> <!-- Esta línea hará que la página se actualice automáticamente cada 15 segundos--> <meta charset="utf-8" /> …

Member Avatar for rproffitt
0
77
Member Avatar for ChrisJ

This works successfully: $wallet = $user->wallet; $upwallet = ($sell_video == 0 && $wallet >= 1 ? 0.5 : 0); $db->rawQuery("UPDATE ".T_USERS." SET `wallet` = `wallet`- '".$upwallet."' WHERE `id` = '".$video->user_id."'"); (when the sell_video amount is 0 and the wallet amount >= 1, deduct 0.5 from the wallet). Works successfully. I'd …

Member Avatar for gce517
0
104
Member Avatar for Virat_4

This is how I want it to work. 1) First day. It goes to all questions that are asked within last 14 days. 2) It picks each question. Then it RANDOMLY picks 25 users and clicks on "+" to request. 3) It does this for each and every questions asked …

Member Avatar for Naor
0
238
Member Avatar for Blue Visionary

I am using gabrielbull/ups-api for validating user address if a user provides an address I verify weather the address is correct or not I am using a got and getting a response which is quite difficult for me to access the data here is what I am getting in return …

Member Avatar for Dani
1
75

The End.