html - Cicles on PHP/SQL using Submit: Is it possible? -


And thanks for taking your time to read it. I explain it as detailed as possible.

Background

  • I'm only using PHP + SQL, because I'm not allowed to use any other technology , Like JQuery and so, that's why I really can not use any other option.

I am using a set of bullets and choose to use them on HTML option for a form, and then submit them on the same page so that I can see those options I can use it.

One of those options is "Selection", where you can select many areas (i.e. if I take 3, then there will be 3 sets of "first name" and "last name". / P>

Problem

I need to use all of those fields within the same file's file, so I get all the INSERTS of data I can use one cycle for this.

My problem is, I am not able to do this. With the value of the set number, then create an array of all the data and, as soon as possible, insert them as a circle.

The code used for the information submitted is th One is

  $ i = 1; $ Limit = $ _REQUEST ['c']; $ Id_service = $ _POST ['id_service']; $ IDFADRE = $ _POST ['father']; While ($ i & lt; $ border) {$ name_h [$ i] = $ _POST ['name_h']; $ last_h [$ i] = $ _POST ['last_h']; $ AddSon = ("INSERT INTO son ( Id_son, id_father, id_service, name_h, last_h, active) value ('', '$ idfather', '$ id_service', '$ name_h [$ i]', '$ last_h [$] I]', 1) ") ; $ Rs = mysql_query ($ addSon); }  

However, if it was not working, I was thinking, is it possible? Or am I doing something very wrong (except using PHP + SQL only) which I still do not know?

Thanks guys for your time, and have good night!

Sample data

  // $ _POST array (4) {["name_h"] = & gt; String (1) "2" ["last_h"] = & gt; String (1) "2" ["id_service"] = & gt; String (1) "2" ["time"] = & gt; String (2) "50"} // $ _REQUEST array (4) {["name_h"] = & gt; String (1) "2" ["last_h"] = & gt; String (1) "2" ["id_service"] = & gt; String (1) "2" ["time"] = & gt; String (2) "50"} // and an information notice: Undefined index: C in the: \ xampp \ htdocs \ proy \ addreg.php on line 24  


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -