Utherr12 Posted February 4, 2011 Share Posted February 4, 2011 So I have a small function which creates a few text inputs in javascript with the jQuery's append function. The functions appends those elements inside a form element. The function creates the elements, i type something in them, I submit them to a php script file that gives me errors. Undefined index 'q1' 'q2' 'q3' 'q4' where qx (x: 1-4) are the names of 4 inputs/txt. I pass them using POST.I had this problem in the past with JS created elements and sending POST data.Am I doing something wrong ?I can supply parts of the code @ request. Link to comment Share on other sites More sharing options...
[dx] Posted February 4, 2011 Share Posted February 4, 2011 Well, you must define in php script your variables.$q1 = (!empty($_POST['q1'])) ? $_POST['q1'] : '';Part of code would be nice. Link to comment Share on other sites More sharing options...
Utherr12 Posted February 4, 2011 Author Share Posted February 4, 2011 I found the mistake.... i had a GET instead of POST.Such a waste of time omg...sorry. Now it works. Link to comment Share on other sites More sharing options...
thescientist Posted February 4, 2011 Share Posted February 4, 2011 please provide the form code (HTML) and the form processing code (PHP) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.