[SOLVED] array insert

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

[SOLVED] array insert

Post 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>
Last edited by ol4pr0 on Sun Jun 20, 2004 1:45 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]serialize[/php_man]() ?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Code: Select all

$adres = serialize($_POST['adres']);
# following by the query..
# am i right ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yep.
Post Reply