• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Expire's [TUTS] N0.1. How to start work with web developing language [PHP] and [MySQL] Database

Vitrex

Moderator
Hello, EmuDevs.
I'm glad that i'm part of this awesome community !
And in order to thank for the hospitality i wanna start guide series about Websites Developing !
Hope you enjoy this !

PART 1.
Questions And Answers !

1. Which Web developing languages i need to use to create basic systems, like register or log in?
You need to use PHP programing language and bind your script with MySQL queries and pulling data from database.

2. That
PHP:
 language hard to learn?
[COLOR="#40E0D0"]No, all what you need you can find here www.php.net there is all functions and variables are explained, but sometimes not enough explanation here...[/COLOR]

3. I have some Perl or C,C++ knowledge , hard jump to [PHP] right now?
[COLOR="#40E0D0"]Hmmm, NO! [PHP] have almost the same syntax like PERL or C , C++ Languages. php was created from C# language.[/COLOR]

4. Software i need to create websites i can find for free, or i need to pay for them?
[COLOR="#40E0D0"]That Depends on you, there is a lot of software for free and there a lot payment programs, really, i don't like any of programs like Dreamwiewer or NetBeans, Eclipse... I prefer use Notepad++ with customized style, that your best choice !
You can download Notepad++ From Google easy, safe and for free ! [/COLOR]


[CENTER][B][SIZE=4]PART 2.[/SIZE][/B][/CENTER]
Software i need, and some tips how to customize him!

[LIST]

[*]Notepad++

------------
Notepad++ is a text editor and source code editor for Windows. It aims to be a lightweight and robust editor for a variety of programming and scripting languages. One advantage of Notepad++ over the built-in Windows text editor Notepad, is that Notepad++ supports tabbed editing, which allows working with multiple open files. Notepad++ opens large files significantly faster and can be used as a replacement for Windows Notepad.

Notepad++ is distributed as free software. The project was hosted on SourceForge.net, from where it has been downloaded over 27 million times and twice won the SourceForge Community Choice Award for Best Developer Tool. The project is hosted on TuxFamily since June 2010. To display and edit text and programming language source code files, Notepad++ uses the Scintilla editor component.
-------------

[*]WAMP for windos users, LAMP for linux users, that programs includes php hypertext reader and have MySQL install (ofc there are some a other programs like Xampp. i don't use that sh*t...)

------

You can read more about both programs here : [URL="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29"]Wiki page[/URL]

-----

[*]Filezilla if you working on hosted server.

------------

FileZilla is free and cross-platform FTP software, consisting of FileZilla Client and FileZilla Server. Binaries are available for Windows, Linux, and Mac OS X. It supports FTP, SFTP, and FTPS (FTP over SSL/TLS). As of 18 April 2011, FileZilla Client was the 7th most popular download of all time from SourceForge.net. Support for SFTP (SSH File Transfer Protocol) is not implemented in FileZilla Server.

FileZilla's source code is hosted on SourceForge and the project was featured as Project of the Month in November 2003.

Despite the similar names used by Mozilla, FileZilla has no relation to the Mozilla Project.

------------
[/LIST]

Installing all your programs !

[LIST=1]
[*]WAMP/LAMP - Just install with default settings. Then when you install that turn on your Skype and follow images !

Find word Tool, hover your mouse there and click on word "Options"

[IMG]http://puu.sh/5Z3jq.jpg[/IMG]

You will see that :

[IMG]http://puu.sh/5Z3la.png[/IMG]

Go to Section "Advanced" and choose Connection.

[IMG]http://puu.sh/5Z3mo.png[/IMG]

And make sure you have Unchecked "use 80 port 443 as alternatives blablabla"

Now Restart your Skype and run your wampserver.exe

---------------------------------------------------

[*]Notepad ++ - Just install with default settings. When you installed run notepad++ .exe from your desktop.

Find out on the top menu word Settings - > Styles configuration.

You can choose whatever you want style, but i prefer use that 

[IMG]http://puu.sh/5Z3tt.png[/IMG]

[/LIST]

[COLOR="#B22222"]WHY I NEED THAT WAMP? IF I HAVE FILEZILLA ?[/COLOR]
Answer : wamp/lamp programs gives you acces to work on your computer like on a server machine, you can with that programs work on "localhost" of your computer.

Filezilla was made for hosted servers.


[CENTER][B][SIZE=4]PART 3.[/SIZE][/B][/CENTER]
First meet with language and syntax explanation.

All we can find scripts in Google like :

[CODE]
<?php
echo "Hello World";
?>
[/CODE]

If i see this i can tell, BULLSHIT, this is wrong way to show how language works.
First of all we need to know what the fuck is that " <?php ?> " ir " echo "....

Lets start talking about basics, first of all your script must start with word :

[CODE]<?php[/CODE]

That means you tell to server that you started [PHP] script, and server reading your code like [PHP] not Html, Javascript or other languages.
Now you need to close your script for that in [PHP] language we use this :

[CODE]?>[/CODE]

That means, you tell to server that we done with our php code, now server don't read anything after 
[CODE]?>[/CODE] like php code, server will read that like HTML code...

Okay, when we have our empty " Page " for script it should be look like this :

[CODE]
<?php


?>
[/CODE]

Now in php like in other languages we have "functions" "variables" "Constants" to make any action we need to call them. for example if i wanna show some text on my website i need to call "function"  which allows me to do that, in [PHP] we have 2 ways to output text.

[LIST]
[*]echo
[*]print
[/LIST]

Both of them works on newest php version, they almost the same but different so much.

Echo - allow us to use HTML tags inside the code and output them on website. (Text must be between two symbols " " )

Print - I use this only for output my variable if i don't have any more text like.

[CODE]
print $math;
[/CODE]

if you confused atm don't think about i i'll explain it later.

WARNING ! IN ALL CASES YOU MUST END YOUR CODE LINE WITH [CODE];[/CODE]
YOU MUST DO IT. that symbol means you done your code "sentence" and you must close sentence with that symbol, you must put that symbol always you done your line.

for example :

[code]
echo " My text goes here between this two awesome symbols"; - how you see i close my sentence...
print (" My text goes here. "); -- close here
print $text; - and here
[/code]

Okay, right now you ready to know this :
In PHP we have Variable !
Variable - box where we keeping information, text, vales and same things.  we can make our variable all names like " math,good,shit,change,a,b,c " and ETC.
All variable must start with symbol 
[CODE]
$variable = "Our some value";
[/CODE]
WARNING ! Variable name can be $variableName but can't $Variable Name name can't start with number for example we can't have variable with name $1variable

Okay, when we know about variable, how correct make our code sentence and know how to make server to read our php code we can start !

try to make simple web site page which say hello for us !

[CODE]
<?php
$text = "Greetings ! Have a nice day !";
print $text;
?>
[/CODE]

You will see the output 
[QUOTE]
Greeting ! Have nice day !
[/QUOTE]
You telling your website start php script you making variable with your text and then just output that variable .
 
Last edited:

Parranoia

Insane Member
For editors, I would recommend Brackets. It doesn't really have many features for PHP, but it's live development feature is great for any web programming.
It also has tons of plugins to be able to link your git project or sync up a remote server. It's also pretty regularly updated and improved.
 

Tommy

Founder
For editors, I would recommend Brackets. It doesn't really have many features for PHP, but it's live development feature is great for any web programming.
It also has tons of plugins to be able to link your git project or sync up a remote server. It's also pretty regularly updated and improved.

I use JetBrains PhpStorm 6.0 and it practically does the same thing. :D
 
Top