2.
. , .
:
;
;
;
;
.
, .
2.2.
, ,. . :
1) - .
2) - .
3) - .
4) - , .
phpMySQL.
, localhost , :
1 <?php
2 $db_host= localhost;
3 $db_user=root;
4 $db_pass=;
5 $db=Parikmaherskaya;
6 $res=mysql_connect($db_host,$db_bass)or die( ,mysql_error());
7 if($res) {
8 echo ;
9 }
10?>
phpMyAdmin . , .
1- .
2- .
3- .
4- .
5- .
6- .
7- .
8-
.
9.- .
SQL-
. MySQL , .
. , .
SQL- :
- ;
- ;
- , , .
|
|
, . . . SQL- php, .
, , :
, , .
:
- , () . , .
- , . . , . /, . .
PHP Expert Editor.
.
. . MySQL.
, :
- ;
- , ;
- .
. , .
. , . . , .
PHP SQL. , , , , .
. , -4 . , , , , .
|
|
.
1. . . , : . / . . . . . .: , . . ., 2003.
2. . . : . / . . . . . .: , . . ., 2003.
3. . . , 2- . - . . - : -, 2003. - 1048 .
4. .., .. : . . - .: - . .. , 2005. - 304 .
5. . . : - . , . . -. : , 2004.
6. . . : . . .: , 2003.
7. . . . . : - . , . . -. : , 2003.
8. . . 4. .: -, 2003. 553 .
9. . PHP: - .: , 2003. 479 .
10. - ., , . Visual Basic.NET, 3- .: . . .: "", 2003. 416 .: . . . .
11. . . : . / . . . . . .: , . . ., 2003.
12. . . : . / , . .: , 2004.
13. http://yourlib.net/content/category/38/140/153/ - ( .., ..)
14. http://cs.mipt.ru/docs/comp/rus/develop/databases/edu-course-managing-db/index.html - .
15. http://magmenit.narod.ru/essays/essay_1.html - ) .
16. http://ru.wikipedia.org .
17. http://www.mzcoding.ru - . PHP.
18. http://www.denwer.ru/ - Web- (..w., ).
19. http://www.php.su - PHP, MySQL -.
20. http://htmlweb.ru/ - Web-: HTML, DHTML, JavaScript, PHP, MySQL, XML+XLST, Ajax
1-
<html>
<head>
<title></title>
</head>
<body>
<!-- -->
<table width="100%" align="center" border="2">
<tr>
<td height="60" bgcolor="fushsia"" colspan="5">
<font"><h1> "Charm"</h1><img src="620x383.jpg" width="320" height="183" alt="" /> <br /><i><h3>+7(937)-936-54-98 </i>
<br /><i> . -, . , . 1 </i>
<br /><i><i> [email protected]</i></h3></i>
<br />
</font></td>
</tr>
<tr>
<td width="25%" valign="top">
<!-- -->
<table cellpadding="15">
<tr>
<td>
|
|
<font face="Arial" size="2">
<a><a href="1.htm"></a><br />
<a><a href="2.htm"></a><br />
<a><a href="3.htm"></a><br />
<a><a href="4.htm"></a><br />
</font>
</td>
</tr>
</table>
<!-- -->
</td>
<td valign="top">
<!-- -->
<table cellpadding="3">
<tr>
<td>
<p><h3><h1></h1></h3> </p>
<p> ""
.
, .
,
.
,
, , , ,
, , ,
.
, ,
. .
.</p>
</style>
</td>
</tr>
</td>
</table>
<!-- -->
</td>
</tr>
<tr>
<td colspan="2" align="center"><font size="2"> ©2016</font></td>
</tr>
</table>
<!-- -->
</body>
</html>
2-
:
<html>
<head>
<title> </title>
</head>
<body>
<!-- -->
<table width="100%" align="center" border="2">
<tr>
<td height="60" bgcolor="fushsia" " colspan="2">
<font color="white"><h1> "Charm"</h1></font></td>
</tr>
<tr>
<td width="25%" valign="top">
<!-- -->
<table cellpadding="15">
<tr>
<td>
<font face="Arial" size="2">
<a><a href="1.htm"></a><br />
<a><a href="2.htm"></a><br />
<a><a href="3.htm"></a><br />
<a><a href="4.htm"></a><br />
</a>
</font>
</td>
</tr>
</table>
<!-- -->
</td>
<td valign="top">
<!-- -->
<table cellpadding="3">
<tr>
<td>
<tr>
<td height="60" #8080FF colspan="2">
<p><h3> </h3> </p>
<p>
|
|
( , )</p>
</td></tr>
</tr>
</td>
</table>
<!-- -->
</td>
</tr>
<tr>
<td colspan="2" align="center"><font size="2"> ©2016</font></td>
</tr>
</table>
<!-- -->
</body>
</html>
3-
:
<html>
<head>
<title> </title>
</head>
<body>
<!-- -->
<table width="100%" align="center" border="2">
<tr>
<td height="60" bgcolor="fushsia" " colspan="2">
<font color="white"><h1> "Charm"</h1></font></td>
</tr>
<tr>
<td width="25%" valign="top">
<!-- -->
<table cellpadding="15">
<tr>
<td>
<font face="Arial" size="2">
<a><a href="1.htm"></a><br />
<a><a href="2.htm"></a><br />
<a><a href="3.htm"></a><br />
<a><a href="4.htm"></a><br />
</font>
</td>
</tr>
</table>
<!-- -->
</td>
<td valign="top">
<!-- -->
<table cellpadding="3">
<tr>
<td>
<tr>
<td height="60" #8080FF colspan="2">
<p><h3> </h3> </p>
<p><img src="3e809db1903e9c910cd74889ff3a7580.jpg" width="120" height="120" alt="" />
<img src="13-9.jpg" width="160" height="120" alt="" />
<img src="620x383.jpg" width="120" height="120" alt="" />
<img src="32409840-foto-modnyh-strizhek-muzhskie.jpg" width="120" height="120" alt="" />
<img src="1408621099_koloristika.jpg" width="120" height="120" alt="" />
<img src="1432227812_kak-sdelat-prichesku-na-vypusknoy-1.png" width="120" height="120" alt="" />
<img src="Short-Hair-Styles.jpg" width="160" height="150" alt="" /></p>
</td></tr>
</tr>
</td>
</table>
<!-- -->
</td>
</tr>
<tr>
<td colspan="2" align="center"><font size="2"> ©2016</font></td>
</tr>
</table>
<!-- -->
</body>
</html>
4-:
:
<html>
<head>
<title> </title>
</head>
<body>
<!-- -->
<table width="100%" align="center" border="2">
<tr>
<td height="60" bgcolor="fushsia" " colspan="2">
<font color="white"><h1> "Charm"</h1></font></td>
</tr>
<tr>
<td width="25%" valign="top">
<!-- -->
<table cellpadding="15">
<tr>
<td>
<font face="Arial" size="2">
<a><a href="1.htm"></a><br />
<a><a href="2.htm"></a><br />
<a><a href="3.htm"></a><br />
<a><a href="4.htm"></a><br />
</font>
</td>
</tr>
</table>
<!-- -->
</td>
<td valign="top">
<!-- -->
<table cellpadding="3">
<tr>
<td>
<tr>
<td height="60" #8080FF colspan="2">
<p><h3></h3> </p>
<p> </p>
</td></tr>
</tr>
</td>
|
|
</table>
<!-- -->
</td>
</tr>
<tr>
<td colspan="2" align="center"><font size="2"> ©2016</font></td>
</tr>
</table>
<!-- -->
</body>
</html>
5-
<html>
<head>
<title></title>
</head>
<body>
<h2></h2>
<form action="save_user.php" method="post">
<p>
<label> :*<br></label>
<input name="login" type="text" size="15" maxlength="15">
</p>
<p>
<label> :<br></label>
<input name="password" type="password" size="15" maxlength="15">
</p>
<p>
<input type="submit" name="submit" value="">
</p></form>
</body>
</html>
save_user.php
<?php
if (isset($_POST['login'])) { $login = $_POST['login']; if ($login == '') { unset($login);} }
if (isset($_POST['password'])) { $password=$_POST['password']; if ($password =='') { unset($password);} }
require 'connect.php';
$login = $_REQUEST['login'];
$password = $_REQUEST['password'];
$result = mysql_query("SELECT id FROM `users` WHERE login='$login'");
$myrow = mysql_fetch_array($result);
if (!empty($myrow['id'])) {
exit (", . .");
}
$result2 = mysql_query ("INSERT INTO users (login,password) VALUES('$login','$password')");
if ($result2=='TRUE')
{
echo " ! . <a href='index.php'> </a>";
}
else {
echo "! .";
}
?>
testreg.php
<?php
if (isset($_POST['login'])) { $login = $_POST['login']; if ($login == '') { unset($login);} }
if (isset($_POST['password'])) { $password=$_POST['password']; if ($password =='') { unset($password);} }
require 'connect.php';
$result = mysql_query("SELECT * FROM `users` WHERE login='$login'");
$myrow = mysql_fetch_array($result);
if (empty($myrow['password']))
{
exit (", .");
}
else {
if ($myrow['password']==$password) {
$_SESSION['login']=$myrow['login'];
$_SESSION['id']=$myrow['id'];
echo " ! <a href='index.php'> </a>";
}
else {
exit (", .");
}
}
?>
connect.php
<?php
mysql_connect("localhost", "root", "root") or die("<p> ! ". mysql_error(). "</p>");
mysql_select_db("camp") or die("<p> ! ". mysql_error(). "</p>");
?>
exit.php
<?php
session_start();
unset($_SESSION['password']);
unset($_SESSION['login']);
unset($_SESSION['id']);
exit("<html><head><meta http-equiv='Refresh' content='0; URL=index.php'></head></html>");
?>