PHP Language Professional Home Page Prominent Free n
- Slides: 51
PHP Language Professional Home Page
Prominent Free n Speed n Open Source n Crossable Platform n Database Access n Protocol Support n Library n Flexible n Easy n
HTML Clients Browser Server PHP Libraries Interpreter Other Database
�������� PHP n n ��� Appserv ���������� �Web Server �� Appserv ����� Application ���� 1. PHP 2. MYSQL 3. Apache Edit. Plus 2. 10 c
PHP Scripts For Development Application Powered by Atthaphorn
<? php ������ PHP Engine echo phpinfo(); ? >
<? php $number=5; if($number==5) { echo "Number is 5"; } ? > ���� ����
<? php $number=5; if($number==6) { echo "Number is 5"; }else{ echo "Oh!!! NO"; } ? > ���� ����
<? php $name="toon"; if($name=="atthaphorn"){ echo "Hello Atthaphorn"; }elseif($name=="vinai"){ echo "Hello vinai"; }else{ echo "Good Bye"; } ? > ���� �� �����
<? php $name="atthaphorn"; switch($name){ case "atthaphorn": echo "คณโอ "; break; case "vinai" : echo "คณหม "; break; default : echo "ไครกไมทราบครบ "; break; } ? > ������� �
������� �� ตองสรางหนาสงคาจาก page html กอนสงไปยง page php ประมวลผล <html><head><title>����� php </title></head> <body> <form action="test. php" method="post"> ������������� <input type="text" name="textname"> <input type="submit" value="����� "> </form> </body> </html> index. html
����� Function n Function ������ return ����� function <? php function test($number){ $i=5; echo $i+$number; } test(5); ? >
����� Function n Function ���� return ����� function <? php function test($number){ $i=5; return $i+$number; } echo test(5); ? >
Session ��� Cookie session_start() �������� session ������ n session_register() ������������� session <html> n <head><title>Session </title></head> <body> <? php session_start(); $name="������ "; session_register("name"); ? > <a href="test. php">������� session </a> </body> </html> index. php
Session ��� Cookie <? php session_start(); echo $name; ? > test. php
Session ��� Cookie session_destroy() ������������� session �������������������� <html> <head><title>Session </title></head> n session_unregister() <body> ������������� <? php index. php n session_start(); $first. Name="������ "; $last. Name=“����� ”; session_register(“first. Name“, ”last. Name”); ? > <a href="test. php">������� session_unregister</a> </body> </html>
Session ��� Cookie <? php session_start(); session_unregister("first. Name"); echo $firs. Name. " "; echo $last. Name; ? > test. php
Session ��� Cookie n setcookie() ������� Cookie <html> <head><title>Session </title></head> <body> <? php $name_cookie="test. Cookie"; $cookie_value="1234"; setcookie($name_cookie, $cookie_value, time()+60); echo "Cookie ���������� "; ? > <a href="test. php">����� Cookie</a> </body> </html> index. php
Session ��� Cookie <? php echo $HTTP_COOKIE_VARS['test. Cookie']; ? > test. php
Session ��� Cookie ������ header already ������ Code <? php ������ n ob_start(); $name_cookie="test. Cookie"; $cookie_value="1234"; setcookie($name_cookie, $cookie_value, time()+60); echo "Cookie ���������� "; echo "<a href="test. php">����� Cookie</a>"; ob_end_flush(); ? > index. php
Session ��� Cookie <? php echo $HTTP_COOKIE_VARS['test. Cookie']; ? > test. php
����� My. SQL n n n ���������� PHP Myadmin ������� user = attapon password = 1234 ������� database = test table = table 1 �� 3 fields id, f_name, l_name
n n My. SQL(��������� SQL ����� ) mysql_query() SQL Server ������ mysql_query(������ SQL( insert into ������ (field 1, field 2) values (value 1, value 2) ��������� <? php mysql_connect("localhost", "attapon", "1234") or die ("����� "); $sql="insert into table 1 (id, f_name, l_name) values ('1', '������ ', '����� ')"; mysql_db_query("test", $sql); mysql_close(); ? >
My. SQL(������� n Select * from ���� table ����� ) Select * from ���� table order by ����� desc ������ <? php n Select ����� 1, ����� 2, . . from ���� table mysql_connect("localhost", "attapon", "1234") or die ("����� "); ��������� $sql="select f_name from table 1"; n $data=mysql_db_query("test", $sql); $row=mysql_num_rows($data); for($i=0; $i<=$row; $i++){ $show=mysql_fetch_array($data); echo $show[f_name]. " "; } mysql_close(); ? >
My. SQL(����� n update ���� �� ���� set ����� =������ , . . where �� ) ������ �� <? php mysql_connect("localhost", "attapon", "1234") or die ("����� "); $sql="update table 1 set f_name='atthaphorn' where f_name='������ '"; $data=mysql_db_query("test", $sql); mysql_close(); ? >
������ My. SQL(������� ) <? php mysql_connect("localhost", "attapon", "1234") or die ("����� "); $sql="delete from table 1 where f_name='atthaphorn'"; $data=mysql_db_query("test", $sql); mysql_close(); ? >
- Personal home page php
- Personal home page php
- Home.php?language=
- Web.facebook.com /profile.php
- Php php://input
- Page.php?chapter=
- Page.php?chapter=
- Enter.php?page=
- Inurl:page.php?file=
- Page.php?pa=
- Index.php?page= site:com
- Hello hello 1 2 3
- Power dynamics of the standard language
- Apa header
- Most prominent organelle in eukaryotic cells
- For centuries prominent thinkers have pondered
- Advantages and disadvantages of consensus
- For centuries prominent thinkers have pondered
- Islam vs. christianity venn diagram
- What macromolecule is a prominent part of animal tissues
- Prominent foreshadowing
- The banner on the front page of a newsletter
- Memorial stressed syllable
- Latchumanadhas
- V wave cvp
- Pubic arch
- Damodaran control premium
- Small dynamic business search from the ccr home page
- Oswas odisha
- Starts new page numbered sequentially
- Theme for english b langston hughes analysis
- Zone of helpfulness
- Lagi
- Perbedaan home care dan home visit
- Mobile home exchange
- Plurals of flower
- Softly and tenderly jesus is calling
- New mobile home sales oak springs mobile home community
- Let's go to your house
- Jr rabbin imam pretre
- She said that, home economics stands for the ideal home.
- Home sweet home survive prayer
- Php language constructs
- History of php programming language
- History of php programming language
- Php paradigms
- Gibbs free energy equation
- Gibbs free energy
- Delta g units
- A free map determines which blocks are free, allocated.
- Helmholtz free energy
- Free hearts free foreheads