What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-29 17:35:08
explain email injection
<?php if(isset($_POST['name'])) { $name = $_POST['name']; $replyto = $_POST['replyTo']; $message = $_POST['message']; $to = 'root@localhost'; $subject = 'My Subject'; // Set SMTP headers $headers = "From: $name \n" . "Reply-To: $replyto&... Add solution -
Other 2021-10-29 00:25:18
login.php
<?php session_start(); $errorMsg = ""; $validUser = $_SESSION["login"] === true; if(isset($_POST["sub"])) { $validUser = $_POST["username"] == "admin" && $_POST["password"] == "... Add solution -
PHP 2021-10-28 14:42:13
how to keep some value on input field
//set the value //if the method you use is GET <input type="text" value="<?php echo htmlspecialchars($_GET['identifier']); ?>" name="identifier" /> //if the method you use is POST <input type="text" ... Add solution -
PHP 2021-10-28 08:07:12
php mysql search database and display results
<?php $con= new mysqli("localhost","root","","Employee"); $name = $_post['search']; //$query = "SELECT * FROM employees // WHERE first_name LIKE '%{$name}%' OR last_name LIKE '%{$name}%'"... Add solution -
PHP 2021-10-27 17:08:15
core php mail function without phpmailer
<?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); session_start(); $to = '[email protected]'; $subject = 'Subject xxxxx xxxxxx'; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Conte... Add solution -
Javascript 2021-10-26 00:11:08
submitting login and sign up forms using AJAX
<?php session_start(); // check whether the loginbtn was clicked if (isset($_POST['loginbtn'])) { include_once 'dbh.inc.php'; // initialize variable $uid = trim($_POST['uid']); $pwd = trim($_POST['pwd']); // error handlers // ... Add solution -
PHP 2021-10-25 10:13:13
how to setup php mailer
<?php $to = $_POST['email']; $subject = "Email Subject"; $message = 'Dear '.$_POST['name'].',<br>'; $message .= "We welcome you to be part of family<br><br>"; $message .= "Regards,<br>"; // Always... Add solution