Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Well, you're using a session variable so each new entry should be saved from each iteration. Of course, if you execute that line: $_SESSION['numbers'] = array(); each time thru, then what do you think that is doing?
  2. So I'm gathering you are using your page to capture one id at a time and want to save them all, up to 6. When you process each page submitted, add the new $id to the session var that you have created. Check how many there are and if less than 6, repeat. After six, I don't know what you want to do. Do I have to write the code?
  3. Their site lets you add html code to it? Interesting. Really???
  4. Get rid of all those divs!!! Needless. Plus your initial post shows only 3 input fields - where are the rest. The interface between html and php is the vars identified by the "name=" attributes of input tags. Plus handling checkboxes is tricky for newcomers so you should google something like "php handling checkboxes" and look for a good example. Plenty of them out there.
  5. HTH. I'm still confused by your last posts, but you marked this answered, so my work here is done.
  6. http://us.php.net/manual/en/funcref.php Search box at top Type in "array" All kinds of useful things there you are going to want to know about.
  7. You want to learn about arrays in php?? Try the php manual? Or is it something else you want?
  8. I don't know what you are talking about. The usual process is: script builds page and sends blank input fields in a form user fills in form and hits submit script reads the input vars from POST and validates them, cleans them and does a query to post the db (basically). Then script either sends back an empty page again for the user, or sends back a new page with different info on it based on what the user did on the first screen. Not sure what you are trying to say here: "The problem is once data has been uploaded it does not dynamically display on page" Of course it doesn't dynamically display - you have to send it, whatever it is.
  9. Truly - since you are not doing a filter there is no sense using this new function. See my example for handling input above. I believe that's how most people process input. That and escaping the potential "bad" data input that could go into a db. as for your if statements - look them up in the php manual - the php programmer's best friend. if (conditions) { statement; statement; } else { statement; statement; } Note the placement of the semis.
  10. As for the error message, you probably have a stray space character or blank line in your script and that is the data that is being sent. Actually it tells you what line to look for, so see what's there. As for your question - Let me see if I have this straight. Your user puts info on the page and hits submit. You do you updates. Now - what "updates" do you want to see on the page after the db has been updated? Anything that the user didn't input you would obviously have to send back to the page (along with the previous input vals of course) so yes - you have to refresh the page in a sense. Are you doing this update via ajax/js or thru an actual submit button calling a php script?
  11. Good catch! And I got to thinking - if you are not applying a Filter with the 'filter_has_var' function, why use it at all? Perhaps the user is new and doesn't realize that there is a more straight-forward way to capture input values from a form? I actually had not heard of these functions until now.
  12. When one has problem, one usually traces thru the program with echo statements to help you know what is going on with an exit at some point so that you can track how far you got and remove them and add more later on in the stream. That works fine in a development environment when you don't have a real debugging tool. But in this case I think I've shown you the problem.
  13. Also - notes on "filter_has_var" say that an empty value returns true. That could be your problem. Why not : $var=''; if (isset($_GET['var'])) $var = $_GET['var'] if ($var == '') (show error)
  14. Great! Your answer is at least a start. Now add some debugging (echos) to tell you what you ARE getting and see if that isolates it some more.
  15. The usual practice for seeking help on a forum is to tell us what is wrong. Not to ask us what "might" be wrong. Give us any error messages your are getting back. And don't give us oodles of code to try and follow. Isolate your problem (thru your normal debugging methods) to the section of code you suspect and just give us that. Please.
  16. Way too much code to wade through! But - it appears that you are trying (?) to create an html-style email message using a table to display the pertinent information. Fine. Start your html table before your results processing loop. After that code use your loop to grab each row of data, create a new row of your table. Once the loop is over, write out the html to close the table and finish the body of your email. Basically: $msgbody = (introductory message); // start table $msgbody .= "<table><tr><th>xxxx</th><th>yyyyy</th><th>zzzzz</th></tr>"; // begin the loop while ($row = xxx) { $msgbody .= "<tr><td>$row['abc']</td><td>$row['def']</td><td>$row['ghi']</td></tr>"; } // end the table $msgbody.= "</table>"; Am I close?
  17. Showing us the contents of $dir for each of those six might help. As displayed, we don't have any info.
  18. Sounds like you started in way over your head.
  19. You haven't assigned an id value to the dropdowns. JS can't see them.
  20. Sorry - but I can't see your arithmetic problem in this code. I do however see some very questionable tactics throughout your code. Can you explain what the first line ($_POST["filter"] is doing? That and the later line ($_POST['submit'])? Don't they give you some kind of error? Also - what is the purpose of the sprintf function use when building your query statement? Also - do you really mean to create a complete table for each and every row of your results? And - why the closing </font> tag at the end of the table, but individual opening font tags for each td element? As for the math issue, perhaps changing your update query to drop the quotes on numeric values - AFAIK you only need to quote string values, not numeric ones.
  21. I actually downloaded a script generally named PDF2Text.php and attempted to work thru its processing. Seems to me that the script is putting out the formatting chars from the PDF and not the ascii text, or something very close to that. My debugging followed the process of identifying and separating out the pdf objects but my lack of knowledge of regex statements failed me in the last function named getTextUsingTransformations. Perhaps if you know more about regex you can decipher what is supposed to be happening there.
  22. Egg on my face.... Curious, I downloaded the item that I believed would do what you wanted. Sadly, it failed. So did the next two methods I located. So it seems that the problem is still in need of a solution.
  23. You have a need to have a network of servers for your content, yet you don't have your first server even up and running?
  24. Yes - you did say something else. You want to read a screen that is displaying the contents of a pdf. It took me all of 5 minutes to find out how to do it on google. I'll let you do the same.
  25. So OP - have you taken Psycho's advice and fixed your initial problems? If you have I hope you also have learned to turn on error checking, validate your inputs, and practice safe data updating. Your code is woefully lacking in any of those things and you are only asking for trouble down the road. Must each row contain all of these fields? You don't check for that. Also - since you are using arrays as your input values, you may have a problem with the last field - your datetime one, since you are not providing an array of values for it. You say there are no errors showing. Well since you don't run a query I can believe that, but without error checking turned on, you don't even know if your script has other errors. PS - is "size=20px" a valid attribute of an <input> tag? I think it's just "20". Looking forward to your next post.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.