.


:




:

































 

 

 

 


0:




- PHP MySQL

 

- , , , -, , , , , , . .

, . Cookies.

 
 

 

 


, :

"",

,

,

,

.

.

 

1. .

1.

 

. MySQL- PHP.

- , . , , .

 

, install.php, , , .

 

0:

 

<?

@mysql_connect(" "," ","") or die("MySQL Connection Failed");

/* */

@mysql_select_db(" ") or die("MySQL Database Selection Failed");

/* */

 

function install() {

 

$content=" <br/>";

mysql_query("create table products(id int auto_increment primary key, name tinytext, section tinytext, description text, price float)") or die(" <br/>");

$content=$content." <br/>";

/* */

mysql_query("insert into products(name, section, description, price) values(' WV-232', '', ' Tefal ', '2950')") or die(" <br/>");

$content=$content." <br/>";

 

mysql_query("insert into products(name, section, description, price) values(' WV-231', '', ' ', '2630')") or die(" <br/>");

$content=$content." <br/>";

 

mysql_query("insert into products(name, section, description, price) values(' MK-415', '', ' !', '6400')") or die(" <br/>");

$content=$content." <br/>";

/* */

 

mysql_query("create table purchases(id int auto_increment primary key, date tinytext, name tinytext, address tinytext, email tinytext, cart tinytext)") or die(" <br/>");

$content=$content." <br/>";

/* */

 

return $content;

/* */

}

 

echo install();

/* */

?>

 

. , .. . . , mysql_query, $result products. for , mysql_fetch_array.

c catalogue.php.

 





:


: 2016-07-29; !; : 327 |


:

:

, - , ; , - .
==> ...

1279 - | 1314 -


© 2015-2024 lektsii.org - -

: 0.008 .