Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
If you're serious about doing this with javascript, then pick up the nearest pen on your desk and jab yourself smartly in the eye with it, because honestly it would be less painful. Javascript is okay with cookies, which you can use to carry variables over from one page to the next, but it is not great at truly dynamic content.
If you've managed to persuade your mother that it is safe to host your own web site, then now would be a brilliant time to learn PHP, which you can install and run on your server.
Incidentally, I remember your signature said something about the nightmare your parents had when you discovered the control panel. Could this explain their reluctance to let you host a web site?
My mom said I can put something on the Internet when it has more value than a "hello world" type site.
Question: Can [PHP] work offline as well?
Her big fear is still hackers.
PHP appears like a cross between Visual Basic, JavaScript, and DOS Batch files.
This can't be too hard... (famous last words...)
Surely she understands that all great programmers begin with "hello world"!!! It's part of the learning process...
That depends on what you mean by "offline".PHP sits on the web server, and processes requests made to the web server, modifying the HTML output as required. If your web server were offline, and you were merely accessing cached versions of pages, then no, PHP would not help.If your web server is working however, then the dynamic content will be generated. And this is irrespective of whether the end user is on your LAN or beyond your router.So basically, you have the opportunity to test fully your site before you open up the relevant port on your router and let the world at large see your efforts. I think that was what you were hoping.
Again, if she is so concerned about this, perhaps HER computer should not be connected to the internet at all. Does she understand PC security? No system is 100% safe. But then that is just as true OFF the internet, what with identity theft criminals rummaging through your rubbish and all...
Well I can sort of see the point. PHP is not strictly-typed (like for example C), so it can be almost as forgiving as javascript, and it shares a lot of functionality with VB. I'm not sure the PHP developers would welcome the comparison with VB though! PHP really excels at web-based taks, particularly since they involve lots of text processing. This is where PHP is highly optimised.
Hmm...At least you can come back here if you get stuck; plus there are LOADS of PHP resources out there, as you have already discovered. If you go for PHP, bookmark >the online manual< and forget about using web design software for most of your development. Go for something like PHPEditorIDE or Notepad++. PHPEditorIDE is particularly good for starting off, because it includes PHP and CSS context-sensitive help. I prefer Notepad++ though, because it is more robust. Both provide syntax highlighting etc. Both are free (naturally). :)
Right now, I've got just HTML pages, CSS files and the like sitting on my computer. How do I put these files physically on the server so I can test them?
QuoteRight now, I've got just HTML pages, CSS files and the like sitting on my computer. How do I put these files physically on the server so I can test them?You installed Apache, didn't you? My Apache experience is all on *nix systems, so bear with me. I think the default web root is at C:\Program Files\Apache Group\Apache2\htdocs. That's where your files go.Later on, it would be desirable to edit the Apache config file, and put your webroot somewhere else - typically a top level directory on a different partition/hard drive. This slightly enhances security and tends also to enhance performance. But you can save that for another day. Apache config file editing is a black art and takes some getting used to.
<html><body><?php // If php is running correctly, this will display "Hello world!" echo '<p>Hello world!</p>';?></body>
Yes, you're up and running. Now for the web page that your mother loves so much: helloworld.php<html><body><?php // If php is running correctly, this will display "Hello world!" echo '<p>Hello world!</p>';?></body>