Reply to Problem with Arrays and For Each

Your name:

Reply:


Posted by ameshkin on 09/11/06 16:32

What I am trying to do is get all the information in the text area into
the database. But what happens with this script, is that for each $div,
a NEW entry gets put into the database. I want EVERYTHING in the text
area into ONE new entry in the database...

echo '<textarea name="style" cols="50" rows="5"
onClick="this.focus();this.select()">';
foreach($match[0] as $div) {
$div = str_replace('\'', '"', $div);

echo $div;

}

?>

<?php
echo "</textarea>";

$sql = mysql_query("INSERT INTO `layoutsQ` ( `auto` , `site` , `cat` ,
`code` , `name` )
VALUES (
'', 'myspace', '$cat', '$div', '$name'
)",$piggybank) or die("db error");

?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация