[EdLUG] Help 10

Jeremy Nicoll jn.ml.elx.813 at letterboxes.org
Fri May 15 12:09:51 UTC 2020


On Fri, 15 May 2020, at 10:17, Andrew Ramage wrote:
> I didn't realise that I could use HTML in a php script. I hand have now 
> copied andrew.html to index.php but only div1 is displayed. How do I 
> get the whole screen displayed ?

Andrew, the purpose of a  thing.php  file stored on a webserver is to 
execute on the webserver.

When a user's browser requests a page from the server, but the page 
is thing.php, the server runs the php code to generate the html (etc) 
page that is sent to the user.   

The page the user is sent needs to contain the html representation of 
what you want to show them, plus (perhaps) CSS (to give more control
of what the page looks like) and (perhaps) JavaScript to allow clever 
things to happen on the page.

You need to understand that while the logic that runs in someone's
browser (specified by html elements like 'form') and JavaScript. and
the logic that runs on a server (written in PHP) clearly need to have 
been designed to work together... they run on separate computers.

I'd suggest you spend some time reading around what each bit 
does, starting eg here:

 https://www.w3schools.com/php/php_intro.asp


-- 
Jeremy Nicoll - my opinions are my own.



More information about the EdLUG mailing list