mdmb
mdmb

Reputation: 5283

Displaying PHP result in the same page

I want to add custom PHP to my wordpress site. I managed to do it but the result is displayed in another page and it is just simple text.

I created simple calculator, and when user hits submit I want a div with the result to occur right below this calculator.

What is the simple way to do it or where can I seek some advice? Couldn't find it on google.

PS I am using wordpress themes so I added the action for the form as another file.

Upvotes: 0

Views: 78

Answers (1)

dudzio1222
dudzio1222

Reputation: 44

You could use javascipt to toggle visibility of your calendar div after response or add your custom div into response. You didn't wrote much. At first you should check out what is AJAX and find out where your response is creating.

If you didn't choose to add that for response, you can simple add PHP block to your templates files with <?php ... ?>.

Good luck! :)

Upvotes: 1

Related Questions