Category : forms

<?php $localhost = "localhost"; $username = "root"; $password = ""; $databsename = "cp"; $conn = new mysqli($localhost, $username, $password, $databsename); if($conn->connect_error){ die("Connection Failed" . $conn->connect_error); } $fname = $_POST[‘fname’]; $lname = $_POST[‘lname’]; $email = $_POST[’email’]; $mob = $_POST[‘mobile_number’]; $user = $_POST[‘uname’]; $pass = $_POST[‘pass’]; $sql = "INSERT INTO `user_register` (`first_name`, `last_name`, `email_id`, `mobile_number`, `username`, `password`) ..

Read more

Am trying find the difference between current time and a selected date and time but it gives me an error <div class="col-md-6"> <div class="form-group"> <input type="datetime-local" class="form-control" name="time" placeholder="deadline" required> </div> </div> $currentdate= date("mm/dd/yy"); $currentitme=time("H:i:s"); $now=date("Y-m-d H:i:s", strtotime($currentdate . $currenttime)); $time=$this->time($_POST["time"]); $difference=$time-$now; This is the error Uncaught ArgumentCountError: time() expects exactly 0 arguments, 1 given ..

Read more

I am trying to create a form submit but I bumped to a unexpected scenario. When form submitted by clicking the submit button The web app reroute to my index page of the resource route With the form variable and values appended in the URL. Example URL before submitting: http://127.0.0.1/admin/products/create URL after submitted: http://127.0.0.1/admin/products?_token=qQ4klvK2egdsP77iMY4RQhXd5laJDUONRyuh8oQd&productTitle=&productPrice= View ..

Read more