allora c'è qualcosa che mi sfugge
devo per forza mandare la roba al client a pezzi? non posso dirgli ok fai questo e poi questo e poi quest'altro alla fine mandami li.
tra l'altro mi sfugge perchè nel mio codice in realtà non credo di avergli ancora mandato nulla, voglio dire:
codice:
<?php
error_reporting("55");
$connection = mysql_connect("localhost" , "rivera" , "rivera");
$db = mysql_select_db("saf" , $connection);
$query = "INSERT INTO artist(artist ,sub_title ,page, description ,link , submitted,meta_author ,meta_desc ,meta_key ,born ,dead) VALUES
('$_POST[artist]','$_POST[sub_title]','$_POST[page]','$_POST[desc]','/pages/artist/$_POST[letter]/$_POST[link]', now() ,'$_POST[meta_author]' ,'$_POST[meta_desc]' ,'$_POST[meta_key]','$_POST[born]','$_POST[dead]')";
$result = mysql_query($query);
$artistinfo = mysql_insert_id();
mkdir($_SERVER['DOCUMENT_ROOT']."/pages/artist/$_POST[letter]/$_POST[link]/");
touch($_SERVER['DOCUMENT_ROOT']."/pages/artist/$_POST[letter]/$_POST[link]/index.php");
$filename = $_SERVER['DOCUMENT_ROOT']."/pages/artist/$_POST[letter]/$_POST[link]/index.php";
$somecontent .= "<?php \n";
$somecontent .= "\$connection = mysql_connect(\"localhost\" , \"rivera\" , \"rivera\");\n";
$somecontent .= "\$db = mysql_select_db(\"saf\" , \$connection);\n";
$somecontent .= "\$query = \" SELECT * FROM artist WHERE artistid='$artistinfo' \"; \n";
$somecontent .= "\$result = mysql_query(\$query);\n";
$somecontent .= "\$array = mysql_fetch_array(\$result);\n";
$somecontent .= "?> \n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/head.php\"); ?>\n";
$somecontent .= "<style type=\"text/css\" media=\"all\"></style>\n";
$somecontent .= "<meta name=\"author\" content=\"<?=\$array['meta_author']?> - Sound And Freedom\">\n";
$somecontent .= "<meta name=\"description\" content=\"Sound And Freedom - Music Around the World - <?=\$array['meta_desc']?> \">\n";
$somecontent .= "<meta name=\"keywords\" content=\"<?=\$array['meta_key']?> sound music mp3 player guitar artist lyrics tabs\">\n";
$somecontent .= "<title>SoundAndFreedom.com - <?=\$array['artist']?></title>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].'/include/php_pages/body1.php'); ?>\n";
$somecontent .= "
<h1><?=\$array['artist']?></h1></p>\n";
$somecontent .= "
<h2><?=\$array['sub_title']?></h2></p>\n";
$somecontent .= "
<img class=\"gimg\" src=\"<?=\$array['imgsrc']?>\" alt=\"[ <?=\$array['title']?> image ]\"><a class=\"dlink\" href=\"<?=\$array['imgsrc']?>\">d</a><?=\$array['page']?>";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/body2.php\"); ?>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/wiewnews.php\"); ?>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/body3.php\"); ?>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/wiewextras.php\"); ?>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/body4.php\"); ?>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/bestlinks.php\"); ?>\n";
$somecontent .= "<?php include(\$_SERVER['DOCUMENT_ROOT'].\"/include/php_pages/bottom.php\"); ?>\n";
$handle = fopen($filename, 'r+');
fwrite($handle, $somecontent);
header("Location: addartistimage?id=".$artistinfo."&location=".$_SERVER['DOCUMENT_ROOT']."/pages/artist/$_POST[letter]/$_POST[link]/");
?>
dovè che mando qualcosa? :master: