07-06-2005
|
#1 (permalink)
|
|
get nasty!
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
|
totally new to php
okay.
I installed my nice and pretty mysql, my odbc driver, my frontend software to interact with my db, I created my db and my tables.
now I should get down on my coding.
problem is I have absolutely no idea whatsoever about php syntax. anyone know of a good online guide to php syntax? it should be for total beginners, but I'll put any needed extraeffort to understand more advanced guides or tuts...
^^
__________________
some day I'll understand why on earth I started drawing...
Last edited by Uncle Ghed; 07-06-2005 at 02:25 PM..
Reason: uncomplete thread
|
|
|
07-06-2005
|
#3 (permalink)
|
|
get nasty!
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
|
that's what I was looking for... I'll go through each one of them!!
thanks! ^^
__________________
some day I'll understand why on earth I started drawing...
|
|
|
07-06-2005
|
#4 (permalink)
|
|
Local Biorust Beast
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253
|
No problem, and play around with the code samples, if you just follow anything, your results won't be worthwhile..
Learning to program is about being able to experiment.
|
|
|
07-06-2005
|
#5 (permalink)
|
|
Sheep Worrier
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,105
|
Compared to many other programming languages, I have found PHP remarkably easy to pick up. The only real problem is its lack of dedicated development tools that automatically detect syntax errors. Constantly forgetting to terminate my lines in Notepad (well, EditPlus - a kind of notepad on steroids) is a real pain in the ass!
__________________
|
|
|
07-07-2005
|
#6 (permalink)
|
|
get nasty!
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
|
hehe...
I believe that Notepad (just him, flat) is for real hardcore coders that can catch any mistake at a first glance.
I love EditPlus, thouh I've found UltraEdit that's really nice and pretty flexible for a text/hex editor. It supports the main coding languages (such as perl, c++, java AND js, php)...
strangely enough it doesn't support asp for higlited code, nore (even stranger from my point of view) css...
but it remains an extremely powerful tool... I do suggest you all try it!
as for my php knowledge... i'm getting it going... and be sure about it, i'll get experimenting and messing around and drinking litres (yep, I'm European.. ^^) of coffee pretty soon...
and obviously bothering all of you with extremely dumb questions... heheh... ^^
__________________
some day I'll understand why on earth I started drawing...
|
|
|
07-07-2005
|
#7 (permalink)
|
|
Invicible Snake
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668
|
I`ve never seen any question mean "dump" before , so just ask
Here `s some website that i used when learning PHP :
- http://www.phpfreaks.com --> very good for all of PHP users,tons of nice section to surf
- www.appservnetwork.com --> A all in one installer package for PHP,MySQL,phpMyadmin and Perl , if you are new,i recommend PHP 4.0.x
- www.hotscript.com --> A huge scripts storage,most of them are free,you can have tons of experiences form them.
- http://www.ankord.com/phpxedit.html --> A very cool PHP IDE,believe me,its really good,(if you have Dreamweaver installed on ur machine,you dont need to use this ^^,),make the coding become easier with Debugger,class,function and variables explorer,highlighted syntax and much more,cheap
And finally,if you want some cool ebuk (fr-e-e) about PHP programming,just contact me hehe.
__________________
|
|
|
07-07-2005
|
#8 (permalink)
|
|
Local Biorust Beast
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253
|
No such thing as a dumb question, there are stupid questions, but those are obvious.
PHP is a powerful language, all anyone needs to do is get used to the syntax styles, the basic little rules that make it possible to code:
{ } to signify code sections
; after every statement
$ for variables...
Stuff like that, once you have that down to motor memory, then you can learn how to do some amazing things.. programming is like learning a new language, you learn the grammar before the vocabulary.
|
|
|
07-08-2005
|
#9 (permalink)
|
|
get nasty!
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
|
exactly...
that brings us back to the purpose of my thread... ^^
by the way, it would be really nice to have a quick a tut on the basics of a language like php on biorust... its quick expansion and its powerful potential will make a huge item of web programming in the next few years (I mean, bigger than it already is)...
asking too much? I know, I know... sorry, y'all!! :P
__________________
some day I'll understand why on earth I started drawing...
|
|
|
07-08-2005
|
#10 (permalink)
|
|
Local Biorust Beast
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253
|
Such would be good, however to only teach the syntax of php would be confusing, perhaps I can create a cheatsheet at some point (hopefully in the near future), which will cover common syntaxual errors, and how to correct them..
This requires thought, which I have little of right now (work.. almost..... over............with)
*passes out*
|
|
|
07-09-2005
|
#11 (permalink)
|
|
Invicible Snake
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668
|
As i known,programming is fun like sex,dont get urself too deep on it,relax whenever you feel it necessary or you`ll be passed out like the one above me.
__________________
|
|
|
07-09-2005
|
#12 (permalink)
|
|
get nasty!
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
|
looks like i'm starting to have my first problems... :P
i finally got to the part of my tuts (thanks to Order, really simple to follow and well explained) where i get to make connections with a db.
only problem - the parser returns this:
Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\phpstudy\connection.php on line 28
i installed php 5.0.4, and alll my little programs and classes run nice and smooth... i just don't get it!!
oh, i installed MySql Server 4.1... and it's running...
__________________
some day I'll understand why on earth I started drawing...
Last edited by Uncle Ghed; 07-09-2005 at 04:05 PM..
Reason: little corrections
|
|
|
07-09-2005
|
#13 (permalink)
|
|
Sheep Worrier
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,105
|
Hmmm. Can you post your code? (or at least, the bit that's going wrong...  ).
__________________
|
|
|
07-09-2005
|
#14 (permalink)
|
|
Moderator
Join Date: Jul 2004
Location: Quebec City, Canada
Posts: 50
|
If I recall correctly, 5.0 doesn't come with MySQL enabled by default.
Edit your C:/Windows/php.ini file (assuming that you installed under Windows) and remove the semicolon before the line that says
extension=mysql.dll
You will also have to move the corresponding DLL and libmysql.dll to your C:/Windows/System32 directory, and to restart Apache/IIS. If you can't find that DLL, go to the PHP site, and then download the ZIP package w/out installer. The DLL will be in the ext/ directory.
Oh, and if your script is meant to run on a PHP 5.X installation (might be worth checking with your host), you might as well use mysql i instead. It is an improved MySQL extension that is meant to work with MySQL 4.1 and newer, and should be the way to go, if you're sure that your host supports it  . Then, you would have to replace your mysql function calls with mysqli_xxx instead of the old mysql_.
Last edited by The Eagle; 07-09-2005 at 08:41 PM..
|
|
|
07-09-2005
|
#15 (permalink)
|
|
get nasty!
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
|
YESSSSSSSSS!
The Eagle got it!
the codeline where i was having problems was just the basic connection line...
$connection = mysql_connect("host", "user", "pw") or die ('i did NOT connect myself to the DB!');
oh, only difference: in my php.ini i gave the path to my extension directory...
extension_dir = "c:\php\ext"
just to let you know... i found it more comfy to modify my .ini than to copy files to my windows folder... ^^
thanks again everybody!!!!
^^
__________________
some day I'll understand why on earth I started drawing...
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 05:08 PM. Content Relevant URLs by vBSEO 3.2.0
|