39,326 Topics
| |
Hello, $c = 'bool'; // boolean settype($c, "integer"); // $c is now integer (1) echo $c; Why has $c become the int of 1 and not any other number ? And why is the following set to an int of 0 and not any other number ? $c = 'string'; … | |
With this I'm needing to start off by logging in. This is done by putting in the email of a customer and pressing the login button (this is the customer_login.php page). The login button goes through the index.php page and then goes to the product_register.php page. Once the product_register.php page … | |
With this, I'm needing to first off start with the search bar that searches for the last name of a customer. Once the search button is pressed, in a table below it is to produce the full name of the customer, their email address and their city they reside in. … | |
I'm needing to be able to get a search bar to work in PHP using HTML. I have done some coding, but cannot fully grasp how to do it. What can I do to get the search bar to work? I am needing to be able to search for a … | |
can someone suggest me how to build referral system with code referral and bonus table mysql | |
Hello, does anyone here know how to make notifications with websocket + codeigniter4 / php? Example: will display the total of all users who registered today | |
Hii are someone know the best ways to regenerate csrf token on ajax form submit | |
Hello, Was reading this tutorial on the INTVAL(): https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_var_intval How is this an INT ? $e = array("red", "green", "blue"); echo intval($e) . "<br>"; And, when to use int() function and when to use INTVAL() function and when not to use them ? I am confused! | |
Hello, I have come across these echo types before: echo print_r printf var_dump But now come across: var_export. https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_var_var_export $a = 32; echo var_export($a) . "<br>"; $b = "Hello world!"; echo var_export($b) . "<br>"; $c = 32.5; echo var_export($c) . "<br>"; $d = array("red", "green", "blue"); echo var_export($d) . "<br>"; … | |
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. … |
The End.