Slow php function (i need Async func) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Slow php function (i need Async func)

Hello my sololearn. I have an php website and when the user submitted the form the data move to tge database. And it's okay. But when i setup an SMTP so i can get copy of the entered data to my email too. But it's so slow. It takes about 4 seconds and that's a very BIG TIME NUMBER. I want just to run php function without reloading the page. So is there anyway to run functions on the server ? I mean hosting server not user server side. Or any way to just run php function from another page without making it run on my main page, because i tried the include func. Thanks !

26th Jun 2021, 2:03 PM
Yousef Eabitan
Yousef Eabitan - avatar
1 Answer
+ 2
sending email from php SMTP! without reloading! You have to use Ajax in JS or axios for (React /Vue) this will save your time without reloading the entire page
27th Jun 2021, 2:30 AM
Shahghasi Adil
Shahghasi Adil - avatar