sorry, i forget to put the looping part..
my problem rite now is how to write the array of the
checkbox (kodsubjek[ ]to superglobal array..
name of the checkbox = kodsubjek[ ]
superglob array = $_POST[ ????]
--- Bocean Marius <[EMAIL PROTECTED]> wrote:
> i don't know if i understand what u mean...
> i believe that u want to insert the values of the
> checkboxes in your table one at the time.
> for that you may use foreach
>
> so,
> $yourarray=$_POST["kodsubjek"];
> foreach($yourarray as $value){
> mysql_query("insert into your table the value")
> }
>
> that's should do it.
>
> hth,
> toto
>
>
>
> ----- Original Message -----
> From: ali bin abu
> To: [email protected]
> Sent: Tuesday, March 13, 2007 2:51 AM
> Subject: [php_mysql] help plez regarding array
>
>
> <form method="POST" action="new1.php">
> <input type="checkbox" name="kodsubjek[]"
> value="DDC1001">DDC1001<br>
> <input type="checkbox" name="kodsubjek[]"
> value="DDC1002">DDC1002<br>
> <input type="checkbox" name="kodsubjek[]"
> value="DDC1003">DDC1003<br>
> <input type="checkbox" name="kodsubjek[]"
> value="DDC1004">DDC1004<br>
> <input type="hidden" name="matrik" value="AD001">
>
> <input type="Submit" name="submit" value="submit">
> </form>
>
> i want to create query :
>
> $query = " INSERT INTO daftar (matrik,kodsubjek)
> VALUES
> ('{$_POST['matrik']}','{$_POST[kodsubjek[$i]}')
> ";
>
> the problem is at
> '{$_POST[kodsubjek[$i]]}'
>
> i dont know how to rewrite the array with $_POST?
> PLEZ HELP ME
> thank u in advance
>
>
>
> ____________________________________________________
>
> Yahoo! Singapore Answers
> Real people. Real questions. Real answers. Share
> what you know at http://answers.yahoo.com.sg
>
>
>
>
> [Non-text portions of this message have been
> removed]
>
>
__________________________________
Yahoo! Movies - Search movie info and celeb profiles and photos.
http://sg.movies.yahoo.com/