. , , ,

,,,

- / — ,

: WEB-

: - /

:

. . -07-2

.

:

. .

2010


1         

2         

3         

4          ER

5         


. , , . , . /.

- , : , - . , .

.


: PHP5, CSS, HTML, JAVASCRIPT.

HTML (HyperText Markup Language, ):

HTML -, , . , , HTML-. .

HTML- - , , . . HTML-.

. : html , (.. , , .. ).

, - : , , . . <>. , <B> <b> .

:

<html>

<head>

</head>

<body>

</body>

</html>

<html>

. , :

</html>

,

<html>

<head>

<meta content="text/html; charset=Windows-1251" http-equiv="content-type">

<title></title>

<link href="css.css" rel=stylesheet type="text/css">

<body>

</body>

</html>

<head> </head> - , , - . <title></title> - , <link href="css.css" rel=stylesheet type="text/css"> - ( ).

<meta content="text/html; charset=Windows-1251" http-equiv="content-type"> - :

)

)

HTML-. , .

<BODY> </BODY>. , () .

<Hx>

HTML-, , , .. ( ) 1, - 2, .. , . . "1". 1 :

<H1> </H1>

<P>

, HTML- . ( ). <P>. <P>, .

<P>:

<P ALIGN=left|center|right>

, .

,

<div class="table">

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top"><?php echo "$myrow[text]"; ?> </td>

</tr>

</table></td>

</div>

<BR>

<BR> . - , . :

<br> /.

URL

, , URL. URL . , . GIF JPG

ALT="text" , , . , , . , (), , . ALT , , , Lynx.

HEIGTH=n1 . , . , . , . , , .

WIDTH=n2 , . .

ALIGN , , . . , , .

VSPACE , . , .

HSPACE , VSPACE, .

:

<img src="files/1.jpg" width="200" height="207" title="" hspace="5" vspace="5">

, . , . () .

BODY :

<BODY BACKGROUND="bg.gif">

<HR> .

:

<HR SIZE=number WIDTH=number|percent ALIGN=left|right|center >:

<hr color=#ff5353 size="7">

<FORM> </FORM>.

<FORM METHOD="get|post" ACTION="URL"> _____HTML

</FORM>

METHOD . :

GET: URL, . CGI- (CGI-) QUERY_STRING. GET .

POST: URL. CGI- . ;

ACTION ACTION URL, . URL CGI-,

INPUT

<INPUT> . :

CHECKED - , CHECKBOX RADIOBUTTON .

MAXLENGTH - , . . SIZE. MAXLENGTH SIZE, . MAXLENGTH .

NAME - . , , , , .

SIZE - .

CHECKBOX

(BOOLEAN) . , , CGI-, ON OFF.

HIDDEN

. CGI- , ID , .

PASSWORD

, TEXT, .

RADIO

. TYPE="RADIO" VALUE, NAME. CGI- NAME=VALUE, VALUE VALUE , ( ). RADIO ( NAME) .

RESET

, , .

SUBMIT

, CGI- ( URL), . VALUE , .

TEXT

. MAXLENGTH SIZE ( 20 ).

VALUE - , RADIO ( RADIO )

HTML . HTML-, , , , , , , .

<form action ="mail.php" method="POST" name="form1">

<br> :<br>

<input type="text" name="fio" >

<br> email:<br>

<input type="text" name="email">

<br> :<br>

<select name="delivery" size="1">

<option>

<option>

</select>

<br> :<br>

<textarea name="address" rows="5" cols="30">

</textarea>

<br>

<br> :<br>

<textarea name="condition" rows="10" cols="30">

</textarea>

<br>

<input type="submit" value="">

</form>

: <TABLE>...</TABLE>

, . . . BORDER.

: <TR>...</TR>

<TR>..</TR>. ALIGN VALIGN, .

: <TD>...</TD>

. . , . , . ALIGN = left VALIGN = middle. , .

BORDER TABLE. , . BORDER , , BORDER=3.

ALIGN ALIGN <CAPTION> </CAPTION>, ( ). ALIGN=top.

ALIGN <TR>, <TH> <TD>, . left (), right () center ( ).

VALIGN <TR>, <TH> <TD>. . top (), bottom (), middle ( ) baseline ( ).

COLSPAN , . - 1.

ROWSPAN , . - 1.

CSS

CSS . . , .

CSS . - , , , , , . , , Web . , , , () .

CSS

, CSS , Web-, Web-, , . <LINK>, <BODY>:

link href="css.css" rel=stylesheet type="text/css">

, , , CSS. HREF= URL , . , , , URL (http://...) , .

, 2 :.

a{ font-family:Constantia, Monotype Corsiva;

padding:15px 30px;

font-size:15px;

text-align:left;

letter-spacing:1px;

word-spacing:3px;

font-stretch:wider;

text-align:justify;

color:#303030;

}h2{ font-family:Monotype Corsiva;

font-size:30px;

text-align:left;

letter-spacing:1px;

word-spacing:3px;

text-align:center;

color:#386c00;

font-family - , .

font-weight - : lighter, bold, bolder

font-size - . (), (, , )

color -

text-decoration - , ,

text-align - .

word-spacing

letter-spacing

PHP5 (Hypertext Preprocessor): , , PHP. PHP - , , .. PHP.

PHP : Web- . , web-, . , PHP, , , . , PHP , *nix-. PHP :

           ;

           - GUI PHP-GTK;

           Windows Linux

php- . , .php, web- PHP html-. , HTML, .php PHP, . PHP, PHP :

<?php... ?> <?...?>

$, . , . , .

(;)

PHP , , . ( ).

          (integer),

          (float, double),

          (boolean),

          (string)

          NULL.

          (resource),

          (array)

          (object).

PHP :

          ;

          PCRE.

          , :

-    php5-mysql MySQL,

-    php5-pgsql PostgreSQL

-    .

          PHP -, , Smarty;

          GD, , .

, :

<form action ="mail.php" method="POST" name="form1">

<br> :<br>

<input type="text" name="fio" >

<br> email:<br>

<input type="text" name="email">

<br> :<br>

<select name="delivery" size="1">

<option>

<option>

</select>

<br> :<br>

<textarea name="address" rows="5" cols="30">

</textarea>

<br>

<br> :<br>

<textarea name="condition" rows="10" cols="30">

</textarea>

<br>

<input type="submit" value="">

</form>

, : POST GET.

: (if...else) (switch). : if(condition) statement 1 else statement 2

condition . , statement1. statement2. , else statement2, :

if (!empty($regis)){}

else{}

:

MySQL ( ) . , , , .

MySQL , , . , , . MySQL PHP.

. MySQL GNU (GPL, GNU Public License).

SQL : , , , .. .

CREATE DATABASE

:

CREATE DATABASE db_name;

db_name . forum, - MySQL mysql> :

mysql> CREATE DATABASE forum;

CREATE TABLE

CREATE TABLE :

CREATE TABLE table_name [(create_definition, ...)]

table_name -

ALTER TABLE

ALTER TABLE . , , . :

ALTER TABLE table_name alter_spec

DROP TABLE

DROP TABLE :

DROP TABLE table_name [ ,table_name,...]

, forums SQL-:

mysql> DROP TABLE forums;

DROP DATABASE

DROP DATABASE :

DROP DATABASE database_name

, , forum:

mysql> DROP DATABASE forum;

INSERT INTOVALUES

INSERTVALUES . :

INSERT INTO table_name VALUES (values,)

VALUES .

DELETE

DELETE FROM table_name [WHERE definition]

DELETE table_name , definition , .

authors:

mysql> DELETE FROM authors;

DELETE, UPDATE SELECT WHERE, , . , 1:

mysql> DELETE FROM authors WHERE id_author = 1;

, 13.16 '123' 10:

mysql> DELETE FROM authors WHERE passw = '123' AND id_author > 10;

AND "". "".

SELECT

SELECT :

SELECT column,...

[FROM table WHERE definition]

[ORDER BY col_name [ASC | DESC], ...]

[LIMIT [offset], rows]

column - . . *. FROM table . WHERE , DELETE . ORDER BY col_name (ASC) (DESC). LIMIT MySQL rows offset.

User_inf :

mysql> SELECT * FROM User_inf;

php php, mysql_connect(), , , :

<?php

@mysql_connect("localhost","php","123456");

$sel=mysql_select_db("tec");

$sql="INSERT INTO User_inf(f_name,l_name,data_r,pol,mail) VALUES('".$sname."','".$name."','".$bdate."','".$pol."','".$mail."')";

$res=mysql_query($sql);

$sql="select id_user from User_inf";

$res=mysql_query($sql);

$n=mysql_num_rows($res);

$row=mysql_fetch_($res);

echo $row[$n];

$sql="INSERT INTO User_log(id_user,login,pass) VALUES('".$row[$n]."','".$login."','".$pas."')";

$res=mysql_query($sql);

$sql="INSERT INTO User_town(id_user,town) VALUES('".$row[$n]."','".$town."')";

$res=mysql_query($sql);

mysql_close();

}

}

?>

mysql_select_db

mysql_query , , select update, delete, insert into.

, insert into , .

ER

 

:

index.php

<?php

//

session_start();

include "blocks/db.php"; /* */

$result = mysql_query("SELECT title, meta_d,meta_k,text FROM settings WHERE page='index'",$db);

$myrow = mysql_fetch_array($result);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="description" content="<?php echo "$myrow[meta_d]" ?>">

<meta name="keywords" content=<?php echo "$myrow[meta_k]"; ?>"">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo "$myrow[title]" ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top"><?php echo "$myrow[text]"; ?> </td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>

files.php

<?php

session_start();

include "blocks/db.php"; /* */

$result = mysql_query("SELECT title, meta_d,meta_k,text FROM settings WHERE page='files'",$db);

$myrow = mysql_fetch_array($result);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="keywords" content="<?php echo $myrow['meta_k'] ?>">

<meta name="description" content="<?php echo $myrow['meta_d'] ?>">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo $myrow['title']; ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top"><p><?php echo $myrow['text']; ?></p>

<p>

<?php

mysql_query("SET NAMES = 'cp1251'");

$result = mysql_query("SELECT id,title,meta_d,description,autor,date FROM files",$db);

$myrow = mysql_fetch_array($result);

// - ,

if (!empty($myrow['id']))

do { printf ( "<table align='center' class='lessons'>

<tr>

<td class='lesson_title'><p class='lesson_name'><a href='view_file.php?id=%s'>%s</a></p>

<p class='lesson_adds'> : %s</p>

<p class='lesson_adds'> : %s</p></td>

</tr>

<tr>

<td>%s</td>

</tr>

/table><br><br>",$myrow["id"],$myrow["meta_d"],$myrow["date"],$myrow["autor"],$myrow["description"]);

}

while ($myrow = mysql_fetch_array($result));

else echo ("<p> !</p>");

?>

</p>

</td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>

view_file.php

<?php

include "blocks/db.php";

if(isset($_GET['id'])) {$id = $_GET['id'];}

$result = mysql_query("SELECT * FROM files WHERE id=$id",$db);

$myrow = mysql_fetch_array($result);

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="description" content="<?php echo $myrow['meta_d'] ?>">

<meta name="keywords" content="<?php echo $myrow['meta_k'] ?>">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo $myrow['meta_d']?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top">

<p class="view_title"><?php echo "$myrow[meta_d]"; ?></p>

<p class="view_date"> : <?php echo "$myrow[date]"; ?></p>

<p class="view_date">: <?php echo "$myrow[autor]"; ?></p>

<p><?php echo "$myrow[description]"; ?></p>

<p> : <?php print <<<HERE

<a href="http://tec.kz/admin/files/$myrow[title]">$myrow[title]</a>

HERE;

?></p></td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>

lessons.php

<?php

session_start();

include "blocks/db.php";

$result = mysql_query("SELECT title,meta_k,meta_d,text FROM settings WHERE page='lessons'",$db);

$myrow = mysql_fetch_array($result);

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="description" content="<?php echo $myrow['meta_d'] ?>">

<meta name="keywords" content="<?php echo $myrow['meta_k'] ?>">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo $myrow['title']?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top"><p><?php echo $myrow['text'] ?></p>

<?php $result = mysql_query("SELECT id,title,description,autor,date FROM lessons",$db);

$myrow = mysql_fetch_array($result);

do { printf ( "<table align='center' class='lessons'>

<tr>

<td class='lesson_title'><p class='lesson_name'><a href='view_lesson.php?id=%s'>%s</a></p>

<p class='lesson_adds'> : %s</p>

<p class='lesson_adds'> : %s</p></td>

</tr>

<tr>

<td>%s</td>

</tr>

</table><br><br>",$myrow["id"],$myrow["title"],$myrow["date"],$myrow["autor"],$myrow["description"]);

}

while ($myrow = mysql_fetch_array($result));

?>

<p>&nbsp;</p></td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>

view_lesson.php

<?php

include "blocks/db.php";

if(isset($_GET['id'])) {$id = $_GET['id'];}

$result = mysql_query("SELECT * FROM lessons WHERE id=$id",$db);

$myrow = mysql_fetch_array($result);

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="description" content="<?php echo $myrow['meta_d'] ?>">

<meta name="keywords" content="<?php echo $myrow['meta_k'] ?>">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo $myrow['title']?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top">

<p class="view_title"><?php echo "$myrow[title]"; ?></p>

<p class="view_date"> : <?php echo "$myrow[date]"; ?></p>

<p class="view_date">: <?php echo "$myrow[autor]"; ?></p>

<p><?php echo "$myrow[text]"; ?></p>

<p>&nbsp;</p></td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>

zakaz.php

<?php

//

session_start();

include "blocks/db.php"; /* */

$result = mysql_query("SELECT title, meta_d,meta_k,text FROM settings WHERE page='zakaz'",$db);

$myrow = mysql_fetch_array($result);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="description" content="<?php echo "$myrow[meta_d]" ?>">

<meta name="keywords" content=<?php echo "$myrow[meta_k]"; ?>"">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo "$myrow[title]" ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top"><p> /. 1 , 3 :-)</p>

<p><form action ="mail.php" method="POST" name="form1">

<br> :<br>

<input type="text" name="fio" >

<br> email:<br>

<input type="text" name="email">

<br> :<br>

<select name="delivery" size="1">

<option>

<option>

</select>

<br> :<br>

<textarea name="address" rows="5" cols="30">

</textarea>

<br>

<br> :<br>

<textarea name="condition" rows="10" cols="30">

</textarea>

<br>

<input type="submit" value="">

</form>

</p>

</td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>

contacts.php

<?php

session_start();

include "blocks/db.php";

$result = mysql_query("SELECT title,meta_d,meta_k,text FROM settings WHERE page='contacts'",$db);

$myrow = mysql_fetch_array($result);?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta name="keywords" content="<?php echo $myrow['meta_k'] ?>">

<meta name="description" content="<?php echo $myrow['meta_d'] ?>">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title><?php echo $myrow['title'] ?></title>

<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>

<table width="690" border="0" align="center" bgcolor="#FFFFFF" class="main_border" cellspacing="0" cellpadding="0">

<!-- -->

<?php include "blocks/header.php" ?>

<tr>

<td><table width="690" border="0" cellspacing="0" cellpadding="0">

<tr>

<!-- -->

<?php include "blocks/lefttd.php" ?>

<td width="508" valign="top"><?php echo $myrow['text'] ?>

</td>

</tr>

</table></td>

</tr>

<!-- -->

<?php include "blocks/footer.php" ?>

<tr></tr>

</table>

</body>

</html>


:

1.         _,_-_Web-____MySQL 2003

2.         .-__PHP_MySQL

3.         .-PHP,MySQL__Dreamweaver_MX_2004

4.         _-PHP__MySQL__

5.         ..,.. - PHP5

6.         .. - PHP 5

7.         --PHP5__

8.         ., . .- AJAX PHP.

9.         .-PHP5___web-

10.       ..-PHP__

11.       .-PHP___

12.       ._.-PHP___

13.       .-4

14.       .. - PHP 5

15.       _-PHP_5__

16.       - PHP

17.       - Web- PHP-NUKE

18.       .__.-_4__2-

19.       _-___

20.       _-PHP__

21.       - PHP ( 6)

22.       _,_,_-PHP_5._

: WEB- : - /

 

 

 

! , , , .
. , :