Hi,
I've trying this for more than a week, so, i hope you guys can share with me if you know something.
I have an X value for a textfield which need it to be saved in the database.
the textfield :
<input name="name[ ]" type="text" id="name1" size="40"/>
*the text field can be add up according to the users
then i post it to another page called reg_post.php
$s = $_POST['name'];[/PHP]f[PHP]oreach ($s as $testing) { ?>
<?
echo '<table border=1><tr><td>';
echo $testing;
echo '</td></tr></table>';
$session = session_id();
$sql="INSERT INTO part (sid,name) VALUES ('$session','$testing')";
if (!mysql_query($sql,$conn)) { die('Error: ' . mysql_error());} else { echo ""; } }
}
if (mysql_query($sql,$conn))
{
include ("reg/reg_p.php");}
else {echo $row_sub_menu['content']; }
However, when i put 3 values at the textfiled which are;
value 1 = a
value 2 = b
value 3 = c
when its inserted into the database, the record have extra data which become;
value 1 = a
value 2 = b
value 3 = c
value 4 = c
looking forward to get to know from you guys.
thanks in advanced