0

Hi,

I'm new to php, and I would just like to know if PHP has a client side and a server side similar to jsp?

Reason being - I have completed the front end of a website and I want to add all the functionality now so I'm wondering if I just use <php> tags on the client side or if I made another php file with all the code and import it into the client side and call methods/classes, etc.

Thanks,
Ashton.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by AshtonHogan
0

PHP is server side only. All processing takes place there and only the results of the processing (an html page usually) are sent to the client.

0

Hi,

I've researched a bit and found this answer:

You make a front end page (HTML/PHP) then you make a folder with all your PHP files inside where you'll have your code. For example:

GetNamesFromDB.php file has the code:

<?php
//Code Here
?>

Which is then called using AJAX from an onclick, onchange, etc. i.e:

xmlhttp.open("GET","PHPScripts/GetNamesFromDB.php?MyVar="+MyVar,true);

Thanks,
Ashton.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.