Click to See Complete Forum and Search --> : PHP, does it save a file as is?


SA Heat
11-16-2003, 11:08 PM
Question is, I know my site uses PHP because a while back I had some kind of test that tested it for me by returning the date and time .Is php for saving a file as is? Say I have a form and it has names and next to the names it has 3 options in a drop down box, now when You submit , does the submit tell the file to save it as is? I know this is done by cookies but I was wondering why some scripts I read say Save this file as php and make a blank txt file. Does the PHP file tell it to save an area to teh txt file? I am really confused about this

GavinPearce
11-17-2003, 03:36 AM
I'm confused about your questions as well.

Umm I believe your asking, does a using PHP means it'll create a PHP file when submitting a form for the data or does the PHP make a txt file for the data.

The answer is, to confuse you further, both.

PHP is a programming language that tells a server to form several actions. Some of those actions inculde computing figures, creating files, sorting data etc..

When a form is submitted you can send the data to a PHP scriptm which wioll then decided what to do with it and depending on what script you have, it will do different things.

It may save the data to a txt file, it may send the data via e-mail to you, it could store teh data to a database or even send the data to another html based page.


If you have had experience with Frontpage Server Extensions and are moving on to this, which to me is how it sounds, PHP is nothing like Frontpage Extensions. It is a fully functional programming langauge while Frontpage Extensions are just a friendly user interface with a the programming language operating in the background behind the normal users eye.

PHP is basically that background language. Once learnt, PHP has to be the most usfull online programming languge at this time. (in my view neway).

Gav.

SA Heat
11-17-2003, 11:27 AM
Thanks Gav, thats interesting and it does answer most of my questions about PHP. Whats really interesting is that you said it can save as another html file so I will have to read up more on php. I think this is what I need for my web site, any recomendations for a beginer to get beginner like instructions about this kind of tool?

GavinPearce
11-17-2003, 12:29 PM
The way I learn is by searching for a script that does what I want and just pulling apart to see how it all fits together.

It helps to have a basic understanding on how scripts work, I learnt JavaScript first, then moved on to PHP.

www.hotscripts.com is a good site for looking up scripts.


There are many books out there as well, though I never have sat and rea through one, and i would never pay £30 for some of the books that are out.

I just pickup ones from the library now and again and jus do a little bit of background reading, I don't like being taught by a textbook at all.