CodeLobster IDE
http://codelobster.com/forum/

Running php and html in same file in codelobster
http://codelobster.com/forum/viewtopic.php?f=3&t=24529
Page 1 of 1

Author:  gdb50Can [ Tue Jan 22, 2019 4:38 am ]
Post subject:  Running php and html in same file in codelobster

Hello everyone,
I'm new on here and as well as with codelobster, and php. I will appreciate your assistance and help so as to get me started. The situation is as follows:
I'm trying to write php codes that I want to use for doing things like handling and validating forms in html and other things. I tried the following simple lines of codes below but that does not work (the file is a php file):

<?php
$text="Hello world!";
?>

<!DOCTYPE html>
<html>
<body>

<?php
echo " $text";
?>

</body>
</html>

Author:  Admin [ Tue Jan 22, 2019 6:41 am ]
Post subject:  Re: Running php and html in same file in codelobster

Hi.

Do you have some web server installed?
e.g. does any simple PHP code work?

Thanks,
Codelobster Team.

Author:  gdb50Can [ Tue Jan 22, 2019 5:21 pm ]
Post subject:  Re: Running php and html in same file in codelobster

Admin Wrote:
Hi.

Do you have some web server installed?
e.g. does any simple PHP code work?

Thanks,
Codelobster Team.


Hello,
Thank you for your prompt reply and your assistance in this matter.
I've run a php only file (code snippet below) but after clicking on the preview button i get the message "This site can't be reached". I guess i can say i don't have any web server installed on my machine. I did think (pardon my ignorance) that having codelobster alone would suffice. What should i do in terms of a web server, which one would require me the least space and easy to use?

Thanks

Author:  gdb50Can [ Tue Jan 22, 2019 5:22 pm ]
Post subject:  Re: Running php and html in same file in codelobster

gdb50Can Wrote:
Admin Wrote:
Hi.

Do you have some web server installed?
e.g. does any simple PHP code work?

Thanks,
Codelobster Team.


Hello,
Thank you for your prompt reply and your assistance in this matter.
I've run a php only file (code snippet below) but after clicking on the preview button i get the message "This site can't be reached". I guess i can say i don't have any web server installed on my machine. I did think (pardon my ignorance) that having codelobster alone would suffice. What should i do in terms of a web server, which one would require me the least space and easy to use?

Thanks


Code snippet:

<?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
?>

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/