Page 1 of 1

[SOLVED] array insert

Posted: Sat Jun 19, 2004 12:34 am
by ol4pr0
how do i insert a array into my mysql together with 20 other input fields.

array to be inserted into field adres, ofcourse with alot of other fields

Code: Select all

<td class="row1"><span class="gen">DireccĂ­on:</span></td><td class="row2"><input type="text" class="post"style="width: 200px"  name="adres[]" size="25" maxlength="100" value="Kennedy" /><input type="text" class="post"style="width: 40px"  name="adres[]" size="25" maxlength="6" value="Etapa" /><input type="text" class="post"style="width: 60px"  name="adres[]" size="25" maxlength="100" value="Manzana" /><input type="text" class="post"style="width: 20px"  name="adres[]" size="25" maxlength="100" value="1" /><input type="text" class="post"style="width: 120px"  name="adres[]" size="25" maxlength="100" value="Guayaquil" /></td>

Posted: Sat Jun 19, 2004 12:42 am
by feyd
[php_man]serialize[/php_man]() ?

Posted: Sat Jun 19, 2004 12:49 am
by ol4pr0

Code: Select all

$adres = serialize($_POST['adres']);
# following by the query..
# am i right ?

Posted: Sat Jun 19, 2004 12:53 am
by feyd
yep.