noob to php, would like to learn...help anyone?

liunx

Guest
i would like to start to learn php coding, etc ....

ive just learned SSI and how to implement it, and now would like to move on to php ...

any good places to start learning?

general questions:

is php just like SSI, in which i can just add the code, and the server will insert it?

can i upload php scripts and utilize it with the page with a code?

how do i implement php coding into a page?

does Macromedia DW4 support php, or do i have to us DWMX ?

any examples of basic php codes that is used alot?

do i have to know programming to do php coding?

but as i said, any place to get me to start and learn would be great!whoaaaaa my son. one question at a time.

you have come to the right place my son, sit back and I will teach you :)

1. do not get comfy with WYSIWYG editors like Dreamweaver. yes you can use Dreamweaver MX for php, I recommend you don't. why you ask, well you need to get comfy with the coding and dreamweaver is an graphic editor, when you get alll comfy with php or any other language you can use wha tyou want. in the mean time get to know what the code does and how it works.

2. you first have to see if you server can run php, ask your server admins and see or you can run a script to find out. add this to a file and call it phpinfo.php

<?php
phpinfo();
?>

that is all. save it and upload it and then run it. you will get an output if the server accepts php, you might need the shebang line not sure.

3. all php coding needs the .php, .php3, .phtml extension. you can't have .html and run php, well you can but it is complicated.

4. php is similiar to SSI, but waaaayyyy different. you can include files but you can also writye code to do other stuff, like with databases and cool stuff.

5. want to learn? sure you do, just click on the picture in my sig and goto the tutorials section of my site. there you will find a lot of php tutorials and links to tutorials.

6. have fun because it is the first day of the best day of your life. :DGreat job on choosing PHP. I really like it becuase it is really easy to add to my HTML pages unlike Perl. With perl you had to worry about permissions, escaping HTML, and many other things. Here I just add the code where I want using <? and ?> tags and just upload.
Pauluhh Paul, you still have to escape html just like perl does. other than that yeah it is easy.ill do that php thing like you said as a test...and ill link it when i get done...

but i know my host supports it...it supports "PHP 4.04 w/Cache" as it says ...

thanks, ill look into your tutorials ... but ill have to do that in a couple weeks..have to get this site done...lol ... i just wanted to get a head start ....PHP 4.04 is very old.
I recommend you find a host with PHP v4.1 or above (preferably 4.2.2). Ask your host to upgrade, it's free and it's easy.well, i did some more looking, and they have "PHP version 4.1.2 with cache"

whats the latest version? ill ask them if they can do an upgrade .. hehe4.2.2 is the latest (I think), but 4.1.2 is better than 4.04. that is what my ISP runs on thier server.

not sure what cached means.<!-- m --><a class="postlink" href="http://www.imhosted.com/cache_network.shtml">http://www.imhosted.com/cache_network.shtml</a><!-- m -->

thats what they mean ... dont think its a php thing, but some other software thing that makes it "faster" along with other server side scripts ...

well, i opened a support ticket to see if they can do the upgrade ....4.1.2 is fine as long as you are not banking on making extensive use of Sessions. They were buggy as hell in that version although admittedly it only appeared to affect Windows servers. 4.2.2 is the latest and the most secure. Recently a big security loop-hole was uncovered in 4.1.0 - 4.2.1. It's resolved in 4.2.2 though.scott, in the first reply, you said that i might need the shebang line, whats that?

anyways, looks like when i asked my host about upgrading, they went ahead and made the phpinfo.php file and pointed me to it...lol

<!-- m --><a class="postlink" href="http://whiteazn.com/phpinfo.php">http://whiteazn.com/phpinfo.php</a><!-- m -->

looks like we got php4.2.2 hehe

now to figure out what all that means ...lolthe shebang line is a line that tells apache where php i slocated. you usually only needed it for cgi version of php and not on modules, i think you have a module so don't worry about it.yea, probably...this was all that was in the .php file

<?php
phpinfo();
?>


just as you said .... so i prob got the module...is that better?it is said to be. never ran it myself.

good luck an dhave fun, if you need anymore help you know where to find us :)Originally posted by JaeSun
yea, probably...this was all that was in the .php file

<?php
phpinfo();
?>


just as you said .... so i prob got the module...is that better? Yes, it is better because it uses a ntive Apache library which means that a new process is not spawned everytime someone runs some PHP script on your site. Also the Apache modules are faster than CGI (as they are C function calls).boy am i getting confused!!

but so far, what little i read, it seems that this is almost like C++ (well, kinda, except maybe syntax is little different? im in CSC135 just learning C++ now..lol) ....

also, if im not mistaken, when doing php, you have to code the whole website in php? or can i just do parts of it?What do you mean the whole website?
I have PHP and Perl scripts running on my web site. Also, PHP is very much easier than C.hmmm, i thought C and C++ was different, in that C++ is more object oriented? (whatever that is)...well, at least that is one of the things i learned today in my class ... hehe

like the whole website as in, from html to /html, or is it just parts of the page is in php, while others are in regular html standard ....it deosn't matter, you can have one line or you can have the whole thinkg from <html></html> be php. it doesn't make a difference. C++ is usually done with an IDE and is more Object oriented. can't say much about C as I don't know it. :)C and C++ are different but thast wasn't the point I was making. The point is that PHP is much easier to learn than both of them.yea i know .... i just declared my major to be in computer science, and now im taking CSC135 .... i was just saying that php seems to resemble C++ now that im learning it, and at first glance, im like, whoa!

now the next thing i need to do is learn this MySQL database stuff ... (its all leading up to me installing vBulletin in the future...lol) ..... ive messed around with it in my cpanel of my domain, but im totally lost ...lol

do any of you know of a place, or anyone, that would be willing to help me out personally? like, not in person, but on the internet? like, maybe i can give someone (thats trustworthy) access to my domain hosting, and help me out with the MySQL and all? sounds like a WEIRD question, but just wanted to throw that out there ....php is derived from C


and having someone log on to your domain and help you out is all up to you if you trust them or not.i mght be able to give someone limited access i think .... ill have to check into that ... just gotta find someone willing to help me .... well, not find, but hopefully i meet someone first ... hehe .....
 
Back
Top