Jump to content
Larry Ullman's Book Forums

dorich

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by dorich

  1. Larry: Thanks that was what I needed. One thing I noted in debugging is that if I go to the edit entry page, don't make any edits but still click on the submit button I get the same error as reported above: Since I didn't make any fundamental changes to the script I have to assume that this is the expected behavior. However, I assume that in a production situation this is something to be avoided? Assuming that this is not a problem I created can you point me to any resources that describe how to overcome this behavior. Thanks
  2. Reference: Chapter 12 "Updating Data In A Database" Problem: Using the script from the book my version is failing when it comes to submitting the edits. Description: I took the script from the book and made small modifications for my own application - the changes were purely things like database name, field names etc. When the script I typed out failed I took the original downloaded script and merely modified it to suit my application but it still failed. Symptoms: The error message is Note that there is no mysql error in the feedback. Question: What is the best way to troubleshoot a problem like this where the script fails on the submit. I assume the problem is at my end and that there is something wrong with the either my setup or the minor changes I made to the script but I'm unclear how to troubleshoot. NOTE: The word "not" is missing in the feedback message in the original script(download version). FYI, although I assume this was corrected in later editions. Thanks
  3. First let me say that I find your style of presentation and writing to be very effective. With regard to the issue of making sure that cookies are sent before any header information I understand that the php code to send the cookies has to come before the header information. However, in your example for sending a cookie the first step is to see if the form has been submitted. As I understand the logic if the form has been submitted then the cookie is sent (using setcookie () ). However, if the page has not loaded then the form cannot be set. This suggests that the cookie is sent after the page loads. Based on the logic of the example my interpretation is that the following happens. First comes the code to process the cookie Then the page loads Then when the user submits the form the page is reloaded and the cookie is sent. Is that correct? I'm trying to jump from your example to a simpler situation where I set a flag based on a parameter passed in the URL. In my case it seems that the first thing I have to do is to see if the flag had been previously set. I think this is done by opening the php with a if (!isset ($_COOKIE['flag']) { } Isn't it the case that all cookie code would want to open with a check to see if a cookie had previously been set? Anyway, as you can tell I'm a neophyte stumbling around in the dark so any feedback would be appreciated. Thanks, and once again I really like the way you present this topic. I think its very effective.
  4. My beginners mind is just puzzled by the building of the variable 'birthdate' in the examples on page 126. "birthdate" is created from the concatenation of three pieces of data. However, there appears to be no explicit statement doing the concatenation. Instead "birthdate" is equated to a different variable in each of the three conditional statements. Given that a variable can be changed on the fly I expected that the value of "birthdate" would change each time it was restated. Obviously I'm missing something or there is something implicit in the conditionals that does the concatenation. Why does the concatenation take place? Any pointers to references or online explanations would be appreciated.
×
×
  • Create New...