Is it better to use WordPress with React or only use WordPress?

|
anshul22101998gmailcom 2020-05-06 05:04:28
Patricklab 2020-05-05 22:43:17
Which application

Ecommerce application

rohit267 2020-05-06 06:31:26
Kgauza 2020-05-05 21:45:07
can someone help me with this code?it cannot run:

<!DOCTYPE html>
<html>
<head>
<title>Task 5</title>
</head>
<body>
<?php

include ‘menu.inc’;

?>
<main>

<?php
echo “……………..Task 5 (A)……………..”.” <br>
“#Create function;

function getResult($assMarks) {

if($assMarks >=75)
{
echo “Distinction <br>”;
}
else if($assMarks >=40 && $assMarks<49)
{
echo “You qualify for supplementary <br>”;
}
else if($assMarks >=50)
{
echo “Pass <br>”;
}
else
{
echo “Fail <br>”;
}

}

echo getResult(25);
echo getResult(40);
echo getResult(45);
echo getResult(50);
echo getResult(74);
echo getResult(95);

?>

//End Task 5 A /////////

echo “…………..Task 5 (B)……………

// for loop
for($i=1; $i<=10; $i++){
if($i%2 != 0)
echo “$i – odd number <br>”;
else
echo “$i – Even number <br>”;

}
echo “………..Do While Loop……………….

//do while loop

$i = 1;
do{
if($i % 2 != 0){
echo “$i – Odd number <br>”;
}else{
echo “$i – Even number <br>”; }
$i++;
}while ($i <= 10);

echo “………………..Task 5 (C)……………..
echo “<br>”;

for($i=1; $i<=10; $i++) {
$randNum = rand(1,4);
switch($randNum)

{ Case 1:
echo ‘North ‘.'<br>’;
break;
Case 2:
echo ‘south ‘.'<br>’;
break;
Case 3:
echo ‘East ‘.'<br>’;
break;
Case 4:
echo ‘West ‘.'<br>’;
break;
}
}

?>
</main>
<!– iframe containing PHP source code —>
<iframe src=”task5.txt” width=”1200″ height=”400″>Your browser does not support iframe.</iframe>
</body>
</html>

your echo statements are missing ending quotes

Bijay_5 2020-05-06 09:10:12
can anyone suggest any tutorial about php rest api
rohit267 2020-05-06 09:12:17
Bijay_5 2020-05-06 09:10:12
can anyone suggest any tutorial about php rest api

there are many, go to YouTube

Alexipf 2020-05-06 12:23:01
Hello … I tried to login to one website with api and I acquired the json data to send to api … it successfully passed and give token … but when I use postman to use this url to login it returns json data … how could I return html page as user profile page ?
skycodes 2020-05-06 13:23:00
Hii any php expert here
skycodes 2020-05-06 13:24:34
How to get particular json object from json array
Alexipf 2020-05-06 13:37:56
skycodes 2020-05-06 13:24:34
How to get particular json object from json array

Use json decode like this ….
$a=json_decode($b,true);
$object=$a->(key of object for example : name )
Actually $b is your json encoded

2020-05-06 13:52:21
Please help me in upgrading my CI from 3.0.6 to 3.1.1
Patricklab 2020-05-06 14:09:48
anyone here whose worked with cs-cart software
rohit267 2020-05-06 14:56:49
Alexipf 2020-05-06 12:23:01
Hello … I tried to login to one website with api and I acquired the json data to send to api … it successfully passed and give token … but when I use postman to use this url to login it returns json data … how could I return html page as user profile page ?

postman is for api testing, on they body, form data, there give the json

2020-05-06 17:55:51
Is it better to use WordPress with React or only use WordPress?
rohit267 2020-05-06 18:17:59
2020-05-06 17:55:51
Is it better to use WordPress with React or only use WordPress?

WordPress with react?

2020-05-06 18:18:16
rohit267 2020-05-06 18:17:59
WordPress with react?

yes

rohit267 2020-05-06 18:18:22
how?
rohit267 2020-05-06 18:18:36
the theme is built in react?
2020-05-06 18:19:33
https://www.freecodecamp.org/news/wordpress-react-how-to-create-a-modern-web-app-using-wordpress-ef6cc6be0cd0/

How to Create a Modern Web App Using WordPress and ReactfreeCodeCamp.org
by Bret Cameron Combine the power of a React front-end with the internet’s most popular CMS Want the advantages of a modern React SPA, but need a back-end that feels familiar? In this article, we’ll go through how to set-up WordPress’s REST API, including custom posts types and fields, and
Patricklab 2020-05-06 19:01:41
Is there anyone here whose working with Flutter
Patricklab 2020-05-06 19:01:50
Need some small help have a doubt
skycodes 2020-05-06 20:33:26
Alexipf 2020-05-06 13:37:56
Use json decode like this ….
$a=json_decode($b,true);
$object=$a->(key of object for example : name )
Actually $b is your json encoded

When i follow this method its shows error !

Alexipf 2020-05-06 21:52:33
skycodes 2020-05-06 20:33:26
When i follow this method its shows error !

Share error code please

2020-05-06 22:54:51
I use json decode like this

$json = json_decode($fgc, true);

$firstname = $json[‘firstname’];
$lastname = $json[‘lastname’];

2020-05-06 22:55:18
Not with arrow functions
rohit267 2020-05-07 03:48:17
2020-05-06 22:54:51
I use json decode like this

$json = json_decode($fgc, true);

$firstname = $json[‘firstname’];
$lastname = $json[‘lastname’];

you can use extract( $json) it will make variable with name same as in the json with the values

majed_asiri 2020-05-07 05:34:34
I am using rest api work good on localhost but upload on server not work http error 500
rohit267 2020-05-07 05:37:02
majed_asiri 2020-05-07 05:34:34
I am using rest api work good on localhost but upload on server not work http error 500

turn on display_errors to see erros on php settings

majed_asiri 2020-05-07 05:37:44
How ?
rohit267 2020-05-07 05:39:41
majed_asiri 2020-05-07 05:37:44
How ?

cpnael or pleask?

rohit267 2020-05-07 05:41:14
majed_asiri 2020-05-07 05:37:44
How ?

https://www.a2hosting.com/kb/cpanel/cpanel-software/changing-php-versions-and-settings-in-cpanel this may help

Changing PHP versions and settings using PHP SelectorA2Hosting
cPanel accounts may be have multiple PHP versions available. This article shows how to switch between them using the PHP Selector
rohit267 2020-05-07 05:42:06
majed_asiri 2020-05-07 05:37:44
How ?

or

ini_set(‘display_errors’, 1); ini_set(‘display_startup_errors’, 1); error_reporting(E_ALL);

on the page where the error is coming

rohit267 2020-05-07 05:42:18
starting of the code
majed_asiri 2020-05-07 05:48:06
All good
majed_asiri 2020-05-07 05:48:11
But not work
majed_asiri 2020-05-07 05:48:24
You can my code
majed_asiri 2020-05-07 05:48:32
Maybe error in my code
majed_asiri 2020-05-07 05:48:44
But good work on localhost
rohit267 2020-05-07 05:58:23
majed_asiri 2020-05-07 05:48:44
But good work on localhost

if there is error it will show

majed_asiri 2020-05-07 06:02:46
luv_php-18304.jpg

majed_asiri 2020-05-07 06:02:46
luv_php-18303.jpg

majed_asiri 2020-05-07 06:06:18
This structure correct sharing api ?
skycodes 2020-05-07 06:20:54
Alexipf 2020-05-06 13:37:56
Use json decode like this ….
$a=json_decode($b,true);
$object=$a->(key of object for example : name )
Actually $b is your json encoded

Check your ib dude

rohit267 2020-05-07 06:31:22
majed_asiri 2020-05-07 06:02:46

you are using third party api

rohit267 2020-05-07 06:31:41
please refer their documentation
rohit267 2020-05-07 06:31:57
did you turn on php error?
majed_asiri 2020-05-07 06:41:59
Yes
majed_asiri 2020-05-07 06:42:28
Same problem
rohit267 2020-05-07 08:42:29
majed_asiri 2020-05-07 06:42:28
Same problem

no error?

majed_asiri 2020-05-07 08:52:11
No error but not work
majed_asiri 2020-05-07 08:52:19
Maybe htaccess ?
Goldenzet000 2020-05-07 09:08:52
Looking for a bootstrap developer. Urgent UI design project.
|