vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Ajax form POST help (https://vborg.vbsupport.ru/showthread.php?t=149966)

turnipofdoom 06-18-2007 01:28 AM

Ajax form POST help
 
I would like to post a form via ajax to a php file

The file is index.php, the string passed in has to be ?do=xyz
The form data we need looks like this

Code:

<form>
<tr>
<td class="alt1">A:&nbsp;</td>
<td class="alt1"><input name="post_array[A]" type="text" value="$a" size="10"></td>
</tr>

<tr>
<td class="alt1">B:&nbsp;</td>
<td class="alt1"><input name="post_array[B]" type="text" value="$b" size="10"></td>
</tr>
<tr>
<td class="alt1">
<div align="center"><input name="Edit" type="submit" id="Edit" value="Update"></div>
</td>
</tr>
</form>

The variables that display its current value are set on teh way into the page, they display.
I really dont know a whole lot about AJAX, and none of the examples I could find included dealing with arrays from forms.

The php script expects post_array to be an array so it can foreach over it and use key + value for db inserts/updates.

Thanks in advance for any help/flames. <3

Dismounted 06-18-2007 06:42 AM

Look in the Articles section, I remember there being a tutorial by Zero Tolerance.


All times are GMT. The time now is 04:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01020 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete