39,319 Topics
| |
I am having trouble showing the export buttons, it works perfectly if the data is not fetched from database with the basic example however they are not showing with my php code, I have included the script and necessarry files from https://live.datatables.net/kugajayu/1/edit. Please help, below is my script. <!DOCTYPE html> … | |
Hi Wanted to utilize the php/mysql insert into the FPDI pdf export tool. I have it working just as plain text which is nice. But, i'd like to to have mysql place db entries into it. I've declared my sql connection, just using dreamweaver at the moment. I'm struggling to … | |
Hello Friends, I don't whether it's the right place to ask this question or not. Apologies if it's not the right place. I and two of my friends are working on a startup and now we are in a position to take the startup online. Currently, the major issue that … | |
Hi has anyone seen an error like this before I believe it has to do with logging into a page using domain credentials but our logins have been converted to exchange online (PHP Fatal error: Uncaught TypeError: ldap_get_dn(): Argument #2 ($entry) must be of type LDAP\\ResultEntry, bool given in /var/www/html/folder/external/ldap.php:26\nStack … | |
Hiya, It seems to me that if I put a condition on ```` mysqli_stmt_fetch($stmt); ```` to check if user credentials was ok enough for the data to be fetched, then the whole purpose of using the following function is defeated. ```` password_verify() ```` This is what I mean .. ```` … | |
Hello Folks, How to rid GET METHOD from echoing the submitted webform's search button name in the destination url ? My site search page's url looks like this: http://localhost/Work/buzz/Templates/pagination_GET_METHOD_TEMPLATE.php When I click the search button, I am taken to same page ````$_SERVER['PHP_SELF'];````. Taken to: http://localhost/Work/buzz/Templates/pagination_GET_METHOD_TEMPLATE.php?search=&match=fuzzy&index=crawled_links_index&limit=1&web_search_button= NOTE the last part of … | |
This fails: ```` $password_hashed = password_hash(trim($_POST['password'],PASSWORD_DEFAULT); ```` This also fails: ```` $password_hashed = password_hash(trim($_POST['password'],PASSWORD_DEFAULT)); ```` This works: ```` $password_hashed = password_hash(trim($_POST['password']),PASSWORD_DEFAULT); ```` But I thought trim( did not have the closing bracket. Manual shows it does. So this is why above 3rd sample working ? | |
Hi, I got this long version code: ```` if(ISSET($_GET['limit'])) { $limit = intval($_GET['limit']); } else { $limit = intval(1); } ```` I can shorten it, like this and it works: ```` $limit = ISSET($_GET['limit'])?intval($_GET['limit']):1; ```` Now add an echo and try shortening it. And I get error. I got this … | |
I have a database which contains authors and books. Some of those authors and books contain slashes in the name or title fields. When I query the database for authors, it matches just fine, with or without slashes. When I query books, however, it only finds books without slashes in … | |
I need to check db for matching user credential on login script. There must be atleast one matching row. Else, script should alert user not registered. Need to check the db using the function ````mysqli_stmt_num_rows()````. Assignment is to list all the various valid ways this function can be used to … | |
Helle Fellow Programmers! Unlike last time where I was checking for matching rows count using mysqli_stmt_rows_count(): https://www.daniweb.com/programming/web-development/threads/539306/login-with-prepared-statements-mysqli-stmt-num-rows-function On this thread, I am checking for matching rows count using Sql's COUNT function. This means, both threads are not same so mods do not close them. Issue is, on both threads, no … | |
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 … | |
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 … | |
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, … | |
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"; // … | |
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 | |
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. | |
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 | |
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 … | |
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, … | |
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 … | |
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() … | |
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 … | |
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 … | |
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'] = … | |
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' … | |
Hello there, How to destroy session data when the browser closes ? Note, not dealing with $_COOKIES here. Thanks! | |
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 | |
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? … |
The End.