Which is the best framework to implement http calls in php?

|
Sonu 2021-05-19 09:22:41
2021-05-19 09:22:14
And if you want to do everything remotely then use cronjobs and CPanel api to find list and path of subdomin if found new one then copy or move root files to that folder

Ok bro thanks for helping I will try

Rob_19 2021-05-19 09:23:19
Rob_19 2021-05-19 09:19:41

And this is my code

trisharoy96 2021-05-19 09:38:27
video not uploading in my server
trisharoy96 2021-05-19 09:38:37
what to do
neo_mog 2021-05-19 11:13:07
<?php

require_once(“connect.php”);

$image = $firstname = $lastname = $position = $salary = “”;
$firstnameerr = $lastnameerr = $positionerr = $salaryerr = “”;

if (!is_dir(‘images’)) {
mkdir(‘images’);
}
$image_update = $_FILES[“image”] ?? null;

// echo “<pre>”;
// var_dump($image);
// echo “</pre>”;
// exit;

if ($id = $_GET[‘id’]) {
$sql = “SELECT * FROM developers WHERE id = $id”;

if ($result = mysqli_query($link, $sql)) {

while ($row = mysqli_fetch_array($result)) {
// echo “<pre>”;
// var_dump($row);
// echo “</pre>”;
$image = $row[‘image’];
$firstname = $row[‘firstname’];
$lastname = $row[‘lastname’];
$position = $row[‘position’];
$salary = $row[‘salary’];
}
}
}

// echo “<pre>”;
// var_dump($image);
// echo “</pre>”;
// exit;

if ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$input_firstname = trim($_POST[“firstname”]);
if (empty($input_firstname)) {
$firstnameerr = “Please enter your firstname”;
} else {
$firstname = $input_firstname;
}

$input_lastname = trim($_POST[“lastname”]);
if (empty($input_lastname)) {
$lastnameerr = “Please enter your lastname”;
} else {
$lastname = $input_lastname;
}

$input_position = trim($_POST[“position”]);
if (empty($input_position)) {
$positionerr = “Please enter your position”;
} else {
$position = $input_position;
}

$input_salary = trim($_POST[“salary”]);
if (empty($input_salary)) {
$salaryerr = “Please enter your salary”;
} else {
$salary = $input_salary;
}

//////////////////////////////////
if (!empty($firstname) && !empty($lastname) && !empty($position) && !empty($salary)) {

$imagePath = “”;

if ($image_update && $image_update[‘tmp_name’]) {

if ($image) {
unlink($image);
$imagePath = ‘images/’.randomString(8).’/’.$image[‘name’];
mkdir(dirname($imagePath));

move_uploaded_file($image[“tmp_name”], $imagePath);
}

}

$sql = “UPDATE developers SET image = ‘$image’, firstname = ‘$firstname’, lastname = ‘$lastname’, position = ‘$position’, salary = ‘$salary’ WHERE id = $id”;
// echo “<pre>Debug: $sql</pre>m”;

$result = mysqli_query($link, $sql);

if ($result) {
// printf(“error: %sn”, mysqli_error($link));
header(“location: index.php”);
exit;
}

}
}

function randomString($n)
{
$characters = ‘0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ’;

$str = ”;

for ($i = 0; $i < $n; $i++) {
$index = rand(0, strlen($characters) – 1);

$str .= $characters[$index];
}

return $str;
}

?>

neo_mog 2021-05-19 11:15:13
neo_mog 2021-05-19 11:13:07
<?php

require_once(“connect.php”);

$image = $firstname = $lastname = $position = $salary = “”;
$firstnameerr = $lastnameerr = $positionerr = $salaryerr = “”;

if (!is_dir(‘images’)) {
mkdir(‘images’);
}
$image_update = $_FILES[“image”] ?? null;

// echo “<pre>”;
// var_dump($image);
// echo “</pre>”;
// exit;

if ($id = $_GET[‘id’]) {
$sql = “SELECT * FROM developers WHERE id = $id”;

if ($result = mysqli_query($link, $sql)) {

while ($row = mysqli_fetch_array($result)) {
// echo “<pre>”;
// var_dump($row);
// echo “</pre>”;
$image = $row[‘image’];
$firstname = $row[‘firstname’];
$lastname = $row[‘lastname’];
$position = $row[‘position’];
$salary = $row[‘salary’];
}
}
}

// echo “<pre>”;
// var_dump($image);
// echo “</pre>”;
// exit;

if ($_SERVER[“REQUEST_METHOD”] == “POST”) {

$input_firstname = trim($_POST[“firstname”]);
if (empty($input_firstname)) {
$firstnameerr = “Please enter your firstname”;
} else {
$firstname = $input_firstname;
}

$input_lastname = trim($_POST[“lastname”]);
if (empty($input_lastname)) {
$lastnameerr = “Please enter your lastname”;
} else {
$lastname = $input_lastname;
}

$input_position = trim($_POST[“position”]);
if (empty($input_position)) {
$positionerr = “Please enter your position”;
} else {
$position = $input_position;
}

$input_salary = trim($_POST[“salary”]);
if (empty($input_salary)) {
$salaryerr = “Please enter your salary”;
} else {
$salary = $input_salary;
}

//////////////////////////////////
if (!empty($firstname) && !empty($lastname) && !empty($position) && !empty($salary)) {

$imagePath = “”;

if ($image_update && $image_update[‘tmp_name’]) {

if ($image) {
unlink($image);
$imagePath = ‘images/’.randomString(8).’/’.$image[‘name’];
mkdir(dirname($imagePath));

move_uploaded_file($image[“tmp_name”], $imagePath);
}

}

$sql = “UPDATE developers SET image = ‘$image’, firstname = ‘$firstname’, lastname = ‘$lastname’, position = ‘$position’, salary = ‘$salary’ WHERE id = $id”;
// echo “<pre>Debug: $sql</pre>m”;

$result = mysqli_query($link, $sql);

if ($result) {
// printf(“error: %sn”, mysqli_error($link));
header(“location: index.php”);
exit;
}

}
}

function randomString($n)
{
$characters = ‘0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ’;

$str = ”;

for ($i = 0; $i < $n; $i++) {
$index = rand(0, strlen($characters) – 1);

$str .= $characters[$index];
}

return $str;
}

?>

if (!empty($firstname) && !empty($lastname) && !empty($position) && !empty($salary)) {

$imagePath = “”;

if ($image_update && $image_update[‘tmp_name’]) {

if ($image) {
unlink($image);
$imagePath = ‘images/’.randomString(8).’/’.$image[‘name’];
mkdir(dirname($imagePath));

move_uploaded_file($image[“tmp_name”], $imagePath);
}

}

$sql = “UPDATE developers SET image = ‘$image’, firstname = ‘$firstname’, lastname = ‘$lastname’, position = ‘$position’, salary = ‘$salary’ WHERE id = $id”;
// echo “<pre>Debug: $sql</pre>m”;

$result = mysqli_query($link, $sql);

if ($result) {
// printf(“error: %sn”, mysqli_error($link));
header(“location: index.php”);
exit;
}

}
}

This code does not add the new image, anyone?

2021-05-19 12:06:55
codeslide-32576.jpg
Anyone help me for this program one error coming
2021-05-19 12:07:05
Tell solution
Amigo1064 2021-05-19 13:10:32
2021-05-19 12:06:55
Anyone help me for this program one error coming

You took same variable for Hindi and history

Amigo1064 2021-05-19 13:11:50
Amigo1064 2021-05-19 13:10:32
You took same variable for Hindi and history

You can use 2 different variables for Hindi and history. For example, use hin for hindi and hry for history

2021-05-19 17:02:19
Which is the best framework to implement http calls in php?

Like guzzle or slim or laravel?

JaiSingh46 2021-05-19 17:49:16
2021-05-19 17:02:19
Which is the best framework to implement http calls in php?

Like guzzle or slim or laravel?

Laravel

AryanManik 2021-05-21 14:49:05
How I can get data for selected date in codeigniter..
I want to select date from calendar and fetch on the page
IamTheHunny 2021-05-21 16:19:45
SELECT * FROM table_name WHERE DATE(datetime) = ’21-05-2021′
IamTheHunny 2021-05-21 16:19:57
IamTheHunny 2021-05-21 16:19:45
SELECT * FROM table_name WHERE DATE(datetime) = ’21-05-2021′

This query might help

2021-05-21 20:44:56
Looking for php dev
AryanManik 2021-05-21 20:45:34
Ohh..
I want this dynamically from database
I want to fetch from this userpage via form control
Rashid 2021-05-21 20:59:08
use jquery date picker in form
Rashid 2021-05-21 20:59:21
or else type the date manually
Lav Palve 2021-05-21 21:40:50
AryanManik 2021-05-21 20:45:34
Ohh..
I want this dynamically from database
I want to fetch from this userpage via form control

Try using date picker

JaiSingh46 2021-05-22 12:58:13
preg_split(‘/s+/’, $query, -1, PREG_SPLIT_NO_EMPTY);
Can anyone explain and help me for this query
Seo J 2021-05-22 20:26:42
thanks for that!
DevOp DevOp 2021-05-23 00:59:17
boa noite
DevOp DevOp 2021-05-23 00:59:28
<?php

$lista_ids = ‘2,11’;
$id_pesquisado = ‘1’;
if(isset($id_pesquisado) &&
strpos ( $lista_ids, $id_pesquisado ) ){
$selecionado = “yes”;
} else {
$selecionado = “no”;
}
echo $selecionado;
Olá pessoal sou iniciante no PHP, queria saber se alguém pode me ajudar com uma dúvida. No codigo acima estou usando a função strpos para verificar se ‘1’ faz parte da lista_ids, porém ele me retorna verdadeiro pq é a primeira ocorrência. Estou precisando de uma função que só retorne verdadeiro se realmente for ’11’ .

Akhilesh Kumar 2021-05-23 11:31:15
Hello
Plz help me.
how to python interpreter configuration in pycharm?
SKS7762 2021-05-23 13:35:51
Nyone who knws codeigniter4?
Sonu 2021-05-23 14:30:39
codeslide-32806.jpg
Anyone please help me to solve it
Sonu 2021-05-23 14:51:27
Anyone please help
🙂 2021-05-23 14:55:25
Sorry but I’m a beginner in PHP I’m a MERN 😅 I can help you on that
🙂 2021-05-23 14:55:55
Maybe you can search it over stackoverflow ?
🙂 2021-05-23 14:56:23
🙂 2021-05-23 14:55:25
Sorry but I’m a beginner in PHP I’m a MERN 😅 I can help you on that

Dev*

Sonu 2021-05-23 15:02:12
Ok bro thanks
Khaldoon_1982 2021-05-23 20:58:52
Are you on Linux or windows?
Khaldoon_1982 2021-05-23 21:00:06
Can’t reply bot is removing my reply
Khaldoon_1982 2021-05-23 21:00:18
For some reason
|