Mav666 Posted February 20, 2008 Share Posted February 20, 2008 OK, so I have a form, part of which is generated through AJAX - basically the AJAX part allows you to add extra text boxes - which works until I submit it and cycle through the $_POST (and even the $_GET) and the input from the AJAX part is prominently missing. BUT if I eliminate everything but the form itself on the submitting page, it reads everything, as soon as I add any kind of formatting, the AJAX part goes away. I'm not even sure if this is a PHP issue or what ... Link to comment https://forums.phpfreaks.com/topic/92156-form-processing-_post-doesnt-include-ajax-component-of-form/ Share on other sites More sharing options...
PHP Monkeh Posted February 20, 2008 Share Posted February 20, 2008 When you're adding the new text boxes, what are you naming them? Because you'll have trouble trying to display their $_POST data if they all have the same name. Show us some code also and we may be able to help. Link to comment https://forums.phpfreaks.com/topic/92156-form-processing-_post-doesnt-include-ajax-component-of-form/#findComment-472160 Share on other sites More sharing options...
Mav666 Posted February 20, 2008 Author Share Posted February 20, 2008 The code is generated like this - with $counter being passed by get, that part works for ($i=1; $i <= $counter; $i++) { echo 'Location '.$i.'<br>'; print 'Address 1 <input name="Location '.$i.' Address 1" id="Location'.$i.'Address1" type="text" size="50"><BR>'."\n"; } then inserted into <DIV> like this: document.getElementById('locations').innerHTML = timeValue; when it submits, I collect the data by foreach($_POST as $name => $value) { print "$name : $value<br>"; } The actual script will naturally insert into db rather than print, but this way I see the results right away. The problem is simply that I see the fields and can input data, but they don't show up in the $_POST unless the <FORM> tags are inside the <DIV> or I drop everything but the form (tables, etc) Link to comment https://forums.phpfreaks.com/topic/92156-form-processing-_post-doesnt-include-ajax-component-of-form/#findComment-472175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.