Slow php function (i need Async func) | Sololearn: Learn to code for FREE!

+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 !

6/26/2021 2:03:23 PM

Yousef10

1 Answer

New 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