1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
...
$connection = mysql_connect($host, $user, $password);
if ( ! $connection )
die ("connection impossible");
mysql_select_db($bdd) or die("Impossible d'ouvrir la base de donnee $bdd");
$retour=mysql_query("INSERT INTO jos_content(
id ,
title,
alias,
title_alias,
introtext,
fulltext,
state,
sectionid ,
mask,
catid,
created_by,
created_by_alias,
modified,
modified_by,
checked_out,
checked_out_time,
publish_up,
publish_down,
images,
urls,
attribs,
version,
parentid,
ordering,
metakey,
metadesc,
access,
hits,
metadata
)
VALUES
(
NULL,
'sujet test' ,
'sujet' ,
'',
'',
'',
'1',
'3',
'0',
'8',
NOW() ,
'66',
'$formNom',
'0000-00-00 00:00:00',
'0',
'0',
'0000-00-00 00:00:00',
NOW() ,
'0000-00-00 00:00:00',
'',
'',
'',
'1',
'0',
'1',
'',
'',
'0',
'0',
''
) ") ;
if (!$retour)
{
die('Requête invalide : ' . mysql_error());
}
mysql_close($connection); |
Partager