39,319 Topics
| |
Hello, One of the following code got htmlspecialchars. Which code is correct out of the two ? Both codes build pagination section. Need to add security so users cannot sql inject. Not using http_build_query function here as I want to build a pagination section without it and already built one … | |
Folks, Look at this youtube serp: https://www.youtube.com/results?search_query=make+money+online+in+2022 You are shown 10 search results. Now, if you want to see more results, you got to scroll to the bottom of the page and only then more search results would be presented. Otherwise not. Q1. My question is, what php function or … | |
**I have attached all of the coding needed** I'm using PHP to design a website. The problem that I am facing is that, the button on the add products page isn't taking the inputs and putting them on the products list page. I'm wondering what I can do to get … | |
The benefits of online shopping need no elaboration anymore. Billions of people rely on online shopping service providers across the world. In fact, the e-commerce platforms proved to be saviors for people during the months of lockdown. Developing an online store can be profitable for sure but choosing the right … | |
Sometimes we have a need to take a simple PHP array and represent it as an encoded string. One use case that we have for this at DaniWeb is when a new user signs up, and we ask them to click on a link that was sent to them via … | |
| Hi. Please could someone help me understand what's happening here. I have a MySQL database which has a table with some data in the following format: 2022-03-15 06:55:39:<br/>LineOfSight:<br/>java.lang.Exception:<br/> UNAVAILABLE TELEMETRY BR$0 The field collation is utf8 and the data is stored as text. This data is provided via a 3rd … |
Sometimes we want to know if the webpage was fetched over an SSL connection (e.g. the URL begins with https:// instead of http://). This way, if an end-user is accessing an insecure version of our site, we can redirect them to the secure version. The following PHP function called `no_ssl()` … | |
For some reason, PHP class constants don't play nicely with inheritance. For example, suppose you have the following code: class Foo { const VAR = 'foo'; public function __construct() { echo self::VAR; } } class Bar extends Foo { const VAR = 'bar'; } // This will actually print out … | |
Hello everyone! I am wondering how I can access the ending of my url address. For exampel: www.castingvault.eu/willy And I wand the name "willy" only and then process and use it in my php code. Usually you write the url like this: www.castingvault.eu/members.php?mem=willy and the following is how to access … | |
User interface (UI) design is a process used by designers to create interfaces in software, such as computer devices, that focus on appearance or style. Designers want the interfaces to be easy to use and user-friendly. User interface design covers graphical user interfaces and other forms - such as voice-controlled … | |
Which programming language does PHP resemble? Please tell me | |
I want to make a pdf file in php. I write code like this: <?php require_once __DIR__ . '/vendor/autoload.php'; include('conn.php'); $res = mysqli_query($conn, "select * from smash"); if (mysqli_num_rows($res) > 0) { $html = '<table>'; $html = '<tr><td>ID</td><td>Name</td><td>FatherName</td><td>Address</td><td>Phone</td><td>Class</td><td>Qualification</td><td>Branch</td><td>rollno</td></tr>'; while ($row = mysqli_fetch_assoc($res)) { $html .= '<tr><td>' . $row['id'] . '</td><td>' … | |
I have a table with the below sample output. uid atime adate A_in_out 11 8:16 14/05/2014 I 11 13:35 14/05/2014 I 11 17:23 14/05/2014 I 11 21:09 14/05/2014 I 12 14:06 14/05/2014 I 12 22:39 14/05/2014 I 13 8:00 14/05/2014 I 13 17:12 14/05/2014 I I want to build a … | |
By default, PHP's clone keyword just creates a shallow copy of an object, and doesn't work as desired if the object contains properties that are also objects, because it doesn't create real copies of those objects but rather just pointers to the initial version of them. This function creates a … | |
A little while ago, I wrote a [tutorial](https://www.daniweb.com/programming/web-development/tutorials/537376/sanitize-php-user-input-strings) about how important it is to sanitize PHP user input strings. Not only is it important to sanitize user input being fed into a database query, but it's also important to sanitize user input being displayed to the end-user to generate valid … | |
A PHP array is essentially a stack of elements that can be used to denote a list, represent a collection of variables, etc. You can easily use loops to iterate over each element of an array. As PHP is a loosely typed language, all of the elements of an array … | |
| Hi. Hoping someone can explain this to me please. $quantity = $_POST['quantity']; echo "<pre> -- quantity -- "; print_r($quantity); echo "</pre>"; This returns: -- quantity --Array ( [0] => [1] => [2] => [3] => 2 [4] => [5] => [6] => ) $selectitem = $_POST['selectitem']; echo "<pre> -- selectitem … |
Can someone enlighten me is there any difference if we use framework or not using framework to build REST API? | |
| Hi. I have a local installation of SQLite3 and PHP which runs a small in house PHP application so sql injection is not an issue. I am able to execute the following: if(isset($_GET['deletequote'])) { $qno = $_GET['deletequote']; echo $qno;?><br><?php // for testing $db = new SQLite3('./fi_data.db') or die('Cannot delete quote. … |
I am parsing xml data generated by backup software for SMS and phone logs. Most of the data appears like this: ``` <sms protocol="0" address="##########" date="1495903715000" body="Ok. See you then.;-)" subject="none" ... /> ``` For most bodies of a text message, the data follows the same pattern above: Keyword `body="<string>"`. … | |
I've recently gotten my first ID job as a PHP programmer but one of the tasks that bites my is JS/jQuery, I don't know JS/jQuery but now i'm having to use it. I'm taking a course on udemy.com but I'm having issues, sometimes the code executes and sometimes noting happens … | |
I am new to PHP and I need some help in the below code. The below code is working fine but I need to add a "Functionality to be added in the below code, so that if any New File is uploaded it should auto increment in a series. For … | |
Hi I am still learning a lot about PHP but already have an active website where users can click a link and download digital products (we have no user registration). Some users would like to click a link (which I have created already) which will open up a separate window … | |
hey I'm beginner learning php have hard time to Insert data to product in database with image because the category I did make it work but now I need to update data the same style that I add it with the Insert Code: <?php include('./pro_crud/config.php'); $sql_cat = "SELECT * FROM … | |
I have a couple of scripts from the same template but different version. I am using php and mysql. I need to know how to update the mysql database and the script from version 1 to version 2 with a single click. | |
Hi Everyone! I am new here, and the main purpose of joining this community is getting some help. Actually, I am designing a PHP website where I need to fetch US vehicles data into PHP. I have already used this source to get the vehicle's dataset from here https://www.back4app.com/database/back4app/car-make-model-dataset. Still, … | |
Hello there, I created a "users" table on MySQL and created a few columns namely "accountbalance", "ledgerbalance" and "dailybalance" (all three: BIGINTs). I created a test user and added some random figures. I am trying to retrieve the value of this columns (unique to the user) and them pasted separately … | |
FPDF is a class that provides a useful way to deal with PDF documents using dynamic content. Sometimes, according to a special circumstance, also would be valuable to send directly the PDF as attachment e.g. send an invoice automatically after processing a payment. In this example we use a html … |
The End.