dimanche 8 mars 2015

Is there a way to call a .php file from the .html without wiping out the view of the document?

I am currently using . . .



<form action="phpcall.php" method="POST">
.
.
.
</form>


to initiate my php file with a few values from an html form, and submission by a button click. This call is intended to store the entered values into MySQL DB, and generate a graph to be displayed on the html page.


Is there no way to use the data sent by the html form, to generate some data and display it within the html page without navigating away from the html page? As in the php file inserts pertinent data onto the html page (in this case an image, some simple database info and other various data).


I realize this is a fairly novice question, and this would almost be behaving like Javascript, but if I need this php file to log information to MySQL, the way to do so is not apparent to me. Perhaps setting up the html page as a php document would suffice -- therein reinstantiating all of the same html structures after each call -- but this doesn't seem elegant, and I from what I understand separate php and html files are the norm.


/e My current "solution" is to have the .php have a mirrored format, and sort the variables from there.





Aucun commentaire:

Enregistrer un commentaire