Are you using PDO and created custom methods?

|
2021-02-21 15:19:28
Virendra_Kumar_B 2021-02-21 13:54:31
Hi, Looking Laravel developer in Bangalore. Immediate joining. If you fulfill the requirements as per JD then share your resume on hr@webdigitalmantra.in

Interested

Virendra_Kumar_B 2021-02-21 16:26:15
2021-02-21 15:19:28
Interested

Share your resume

emiljoshy 2021-02-21 18:22:46
luv_php-29108.jpg
I need to align all this boxes….
And also in a way that, surname and DOB come in next line-if the screen width is small
emiljoshy 2021-02-21 18:22:51
Somebody help me
Rockzz_18 2021-02-21 18:44:56
Can anyoy help me
Rockzz_18 2021-02-21 18:46:26
luv_php-29114.jpg

Rockzz_18 2021-02-21 18:49:33
luv_php-29115.jpg

Rockzz_18 2021-02-21 18:50:06
Rockzz_18 2021-02-21 18:46:26

Not fetching the data showing like this

rohit267 2021-02-21 19:03:41
Rockzz_18 2021-02-21 18:49:33

looks like query error, check if image_query is false then echo mysqli_error($result)

rohit267 2021-02-21 19:04:15
one more thing, we can pass 4th parameter as database in mysqli_connect
rohit267 2021-02-21 19:04:40
no need to write mysqli_select db
Skyline_infosys 2021-02-22 13:41:05
Hello Everyone,
we are #hiring following staff at Skyline Infosys
1. 1+ Years Exp #phpdevelopers – (3 Opening)
2. 1+ Years Exp #reactjsdevelopers – (2 Opening)
3. 1+ year Exp #nodejsdevelopers Developer – (2 Opening)
4. 1+ Year Exp. #flutterdevelopers – (2 Opening)
5. 1+years Exp. #businessdevelopmentexicutive(IT) – (1 opening)
Job Location – surat, Gujarat
Interested Candidates can share their CV at info@skylineinfosys.com
You will receive a call from us within 2-3 days if your CV is shortlisted.
Contact No. 8128996966
skyline Infosys
2021-02-22 13:48:06
Any laravel + angular developer for 2year + experience, for location Ahmedabad Gujarat
2021-02-22 13:48:18
Ping me
texas_a 2021-02-22 13:52:27
hello anyone help me pls for login function
Kibira Newton 2021-02-23 08:38:02
Hi guys need help fixing a bug on a php PDO project
Kibira Newton 2021-02-23 08:41:29
On this project am unable to submit signup form details into the dabase
2021-02-23 09:18:07
https://youtu.be/woFj1Y6Ycw8

IPv4 Vs IPv6 | Computer Networking | In HindiYouTube
IPv4 Vs IPv6 | Computer Networking | In Hindi | Tutorial#14

Donate/Support CODEITUP
Paytm: 7827328311
UPI : 7827328311@upi
Google Pay: anand.ignou.ac.in@okicici

Telegram Channel: https://t.me/codeitupyt

Telegram Chat Group: https://t.me/codeitupchat

In this video I have explained about IPv4 and IPv6 and the most important question ipv4 vs ipv6 which is usually asked in the examination.

Join this channel to get access to perks:
https://www.youtube.com/channel/UCO0KFz5_gtZt-AfyIV2sAkw/join

Link to Previous Video: https://youtu.be/sUcRfWn47Qs

Link to next video: https://youtu.be/bbj_iPAEDHo

Facebook Group: https://www.facebook.com/groups/21673…

Instagram: https://www.instagram.com/codeitupyt/

Facebook Page: https://www.facebook.com/Codeitup-104310264625489/notifications/

Website: https://codeitup.in

Tags Used:

codeitup,
python class 12,
class 12 python,
networking class 12,
class 12 networking,
ipv4 vs ipv6,
ipv4 in hindi,
ipv6 in hindi,
computer networking,
what is ipv4,
what is ipv6,
ipv4 and ipv6 in computer network,
ipv4 in computer networks,
ipv4 vs ipv6 in hindi,
ipv4 and ipv6,
ipv4 addressing,
difference between ipv4 and ipv6,
ipv4 and ipv6,
ipv6 tutorial,
computer network videos in hindi,
computer network lectures in hindi,
networking videos in hindi,
ip address in hindi

#codeitup
#python
#networking

raj_eswar 2021-02-23 09:19:38
Kibira Newton 2021-02-23 08:41:29
On this project am unable to submit signup form details into the dabase

What’s the error you are getting

Kibira Newton 2021-02-23 09:20:32
raj_eswar 2021-02-23 09:19:38
What’s the error you are getting

No error bro i think ther is an issue with the code

Kibira Newton 2021-02-23 09:21:19
Host it on a localhost and upload the database messenger.sql
raj_eswar 2021-02-23 09:21:52
Kibira Newton 2021-02-23 09:20:32
No error bro i think ther is an issue with the code

Post your code

It will be better as many can’t take time to download your project and run it and check

Kibira Newton 2021-02-23 09:23:23
raj_eswar 2021-02-23 09:21:52
Post your code

It will be better as many can’t take time to download your project and run it and check

<?php

include “init.php”;
$obj = new base_class;
if (isset($_POST[‘signup’])) {
echo “set”;
$full_name = $_POST[‘full_name’];
$email = $_POST[’email’];
$password = $_POST[‘password’];
$img_name = $_FILES[‘img’][‘name’];
$img_tmp = $_FILES[‘img’][‘tmp_name’];
$img_path = “assets/img/”;
$extensions = [‘jpg’, ‘jpeg’, ‘png’];
$img_ext = explode(“.”, $img_name);
$img_extension = end($img_ext);

$name_status =$email_status = $password_status = $photo = 1;

if (empty($full_name)) {
$name_error = “Full name is required”;
$name_status = “”;
}

// if(empty($email))
// {
// $email_error = “Email is Required”;
// $email_status = “”;
// }
// else{
// if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
// $email_error = “INVALID EMAIL FORMAT”;
// $email_status = “”;
// }else{

// if($obj->Normal_Query(“SELECT email FROM users WHERE email = ?”, array($email))
// )
// {
// if($obj->Count_Rows() == 0){

// }else{
// $email_error = “Email already exist”;
// $email_status = “”;
// }
// }

// }
// }

// }

if(empty($email))
{
$email_error = “Email is Required”;
$email_status = “”;
}else{
if(filter_var($email, FILTER_VALIDATE_EMAIL))
{
$email_error = “Invalid email format”;
$email_status = “”;
}else
{
if($obj->Normal_Query(“SELECT email FROM users WHERE email = ?”, array($email))
)
{
if($obj->Count_Rows() == 0)
{

}else
{
$email_error = “Sorry this email Exist”;
$email_status = “”;
}

}
}
}
// password validation
if(empty($password))
{
$password_error = “Password is required”;
$password_status = “”;
}else if(strlen($password) < 5){
$password_error = “Password is too short”;
$password_status = “”;
}
// image validation

if(empty($img_name))
{
$image_error = “Image is required”;
$photo_status = “”;

}else if(!in_array($img_extension, $extensions))
{
$image_error = “Invalid image extension”;
$photo_status = “”;

}
if(!empty($name_status) && !empty($email_status) && !empty($password_status) && !empty($photo_status))
{
echo “submit”;

move_uploaded_file($img_tmp, “$img_path/$img_name”);
$status = 0;
if($obj->Normal_Query(“INSERT INTO users (name, email, password, image, status) VALUES (?,?,?,?,?)”, [$full_name,
$email, password_hash($password, PASSWORD_DEFAULT), $img_name, $status]))
{
echo “succefully”;
}
}

}

?>

<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0, shrink-to-fit=no”>
<title>Create Account</title>
<?php include ‘components/css.php’ ?>
</head>
<body>
<div class=”signup-container”>

<div class=”account-left”>
<div class=”account-text”>
<h1>Lets Chat</h1>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.
Quod ad omnis rem quidem, porro temporibus culpa velit error,

</p>

</div>
<!– close account-left –>

</div>
<!– close account left –>

<div class=”account-right”>
<?php include ‘components/signupform.php’ ?>

</div>
<!– close account right –>

</div>
<!– close signupcontainer –>

<script type=”text/javascript” src=”assets/js/jquery.js”></script>
<script type=”text/javascript” src=”assets/js/file_label.js”></script>
</body>
</html>

raj_eswar 2021-02-23 09:26:23
Kibira Newton 2021-02-23 09:23:23
<?php

include “init.php”;
$obj = new base_class;
if (isset($_POST[‘signup’])) {
echo “set”;
$full_name = $_POST[‘full_name’];
$email = $_POST[’email’];
$password = $_POST[‘password’];
$img_name = $_FILES[‘img’][‘name’];
$img_tmp = $_FILES[‘img’][‘tmp_name’];
$img_path = “assets/img/”;
$extensions = [‘jpg’, ‘jpeg’, ‘png’];
$img_ext = explode(“.”, $img_name);
$img_extension = end($img_ext);

$name_status =$email_status = $password_status = $photo = 1;

if (empty($full_name)) {
$name_error = “Full name is required”;
$name_status = “”;
}

// if(empty($email))
// {
// $email_error = “Email is Required”;
// $email_status = “”;
// }
// else{
// if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
// $email_error = “INVALID EMAIL FORMAT”;
// $email_status = “”;
// }else{

// if($obj->Normal_Query(“SELECT email FROM users WHERE email = ?”, array($email))
// )
// {
// if($obj->Count_Rows() == 0){

// }else{
// $email_error = “Email already exist”;
// $email_status = “”;
// }
// }

// }
// }

// }

if(empty($email))
{
$email_error = “Email is Required”;
$email_status = “”;
}else{
if(filter_var($email, FILTER_VALIDATE_EMAIL))
{
$email_error = “Invalid email format”;
$email_status = “”;
}else
{
if($obj->Normal_Query(“SELECT email FROM users WHERE email = ?”, array($email))
)
{
if($obj->Count_Rows() == 0)
{

}else
{
$email_error = “Sorry this email Exist”;
$email_status = “”;
}

}
}
}
// password validation
if(empty($password))
{
$password_error = “Password is required”;
$password_status = “”;
}else if(strlen($password) < 5){
$password_error = “Password is too short”;
$password_status = “”;
}
// image validation

if(empty($img_name))
{
$image_error = “Image is required”;
$photo_status = “”;

}else if(!in_array($img_extension, $extensions))
{
$image_error = “Invalid image extension”;
$photo_status = “”;

}
if(!empty($name_status) && !empty($email_status) && !empty($password_status) && !empty($photo_status))
{
echo “submit”;

move_uploaded_file($img_tmp, “$img_path/$img_name”);
$status = 0;
if($obj->Normal_Query(“INSERT INTO users (name, email, password, image, status) VALUES (?,?,?,?,?)”, [$full_name,
$email, password_hash($password, PASSWORD_DEFAULT), $img_name, $status]))
{
echo “succefully”;
}
}

}

?>

<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0, shrink-to-fit=no”>
<title>Create Account</title>
<?php include ‘components/css.php’ ?>
</head>
<body>
<div class=”signup-container”>

<div class=”account-left”>
<div class=”account-text”>
<h1>Lets Chat</h1>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.
Quod ad omnis rem quidem, porro temporibus culpa velit error,

</p>

</div>
<!– close account-left –>

</div>
<!– close account left –>

<div class=”account-right”>
<?php include ‘components/signupform.php’ ?>

</div>
<!– close account right –>

</div>
<!– close signupcontainer –>

<script type=”text/javascript” src=”assets/js/jquery.js”></script>
<script type=”text/javascript” src=”assets/js/file_label.js”></script>
</body>
</html>

Are you using PDO and created custom methods?

Kibira Newton 2021-02-23 09:29:36
Yes
Kibira Newton 2021-02-23 09:29:43
<?php

class base_class extends db {

private $Query;

public function Normal_Query($query, $param =null){
if(is_null($param))
{
$this->Query = $this->con->prepare($query);
return $this->Query->execute();

}else{
$this->Query = $this->con->prepare($query);
$this->Query->execute($param);
}
}

public function Count_Rows(){
return $this->Query->rowCount();
}
}
?>

Kibira Newton 2021-02-23 09:30:38
<?php

class db
{
private $host = “localhost”;
private $dbname = “messenger”;
private $username = “root”;
private $password = “ruth2018”;
protected $con;

public function __construct()
{
try
{
//new PDO(“mysql:host=localhost;dbname=messenger”, “root”, “”);

$this->con = new PDO(“mysql:host=”. $this->host. “;dbname=”. $this->dbname, $this->username, $this->password);

}
catch(Exception $e){
echo “Database connection Problem: “. $e->getMessage();
}
}
}

?>

raj_eswar 2021-02-23 09:47:56
Kibira Newton 2021-02-23 09:29:43
<?php

class base_class extends db {

private $Query;

public function Normal_Query($query, $param =null){
if(is_null($param))
{
$this->Query = $this->con->prepare($query);
return $this->Query->execute();

}else{
$this->Query = $this->con->prepare($query);
$this->Query->execute($param);
}
}

public function Count_Rows(){
return $this->Query->rowCount();
}
}
?>

Surround with try catch and print exception it may help

daikou 2021-02-23 10:07:27
Dear All,

I need Senior PHP Developer to work together in Cambodia. If you have any interest we can meet and discuss together.

Thank you

2021-02-23 10:14:00
Interested
Shailu2204 2021-02-23 10:59:31
Any one tell me how i call js api on page load in php
2021-02-23 11:33:06
daikou 2021-02-23 10:07:27
Dear All,

I need Senior PHP Developer to work together in Cambodia. If you have any interest we can meet and discuss together.

Thank you

Interested

2021-02-23 11:33:15
Shailu2204 2021-02-23 10:59:31
Any one tell me how i call js api on page load in php

Ajax

daikou 2021-02-23 11:34:57
2021-02-23 11:33:06
Interested

If you are interested , we can discuss together for details

2021-02-23 11:35:27
daikou 2021-02-23 11:34:57
If you are interested , we can discuss together for details

What should be role

|