Announcement

Collapse
No announcement yet.

PHP problem - database not updating?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    anyone got any idea, it'd suck if we had to go back to manually managing archives

    Comment


    • #17
      Have you tried running the page/form through an html validator? It could be that your server is more 'strict' than your other server and it doesn't like things like type="Submit" (the capitalized Submit isn't standard, it should be "submit"). That's just one small thing, but you may want to just run it through a validator and make sure it validates correctly.

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools <- awesome site for html/css help

      Comment


      • #18
        just tried it, changed a few bits as you suggested and still getting the problem.

        Its getting a bit ridiculous now

        Comment


        • #19
          OK, you have this line:
          Code:
          $query1 = "INSERT INTO $release_sched_db(act, title, type, release_date, taken_from) VALUES('$act1', '$title', '$type', '$release_date', '$taken_from')";
          You are only getting the title inserted. However, I can't find the other variables, $type, $release_date, etc, even defined. You have this:
          Code:
                      $content = $_POST['type'];
          
                      $contact = $_POST['release_date'];
          But that variables $contact and $content are not the ones you are using in your query. So, where are $type, $release_date, etc defined?

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools <- awesome site for html/css help

          Comment


          • #20
            i never even noticed those before.

            But to answer your question they're defined in the form, when the user inputs into the form, hits submit it should carry it through to the database.


            changing them doesn't make any difference:

            INSERT INTO release_sched(act, title, type, release_date, taken_from) VALUES('', 'qq', '', '', '')

            Comment


            • #21
              They may be defined in the form, but when they get passed, they don't automatically become $type or $release_date. They get passed as $_POST['type'] and $_POST['release_date']. Those aren't the variables you are using though.

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools <- awesome site for html/css help

              Comment


              • #22
                Originally posted by Lynne View Post
                They may be defined in the form, but when they get passed, they don't automatically become $type or $release_date. They get passed as $_POST['type'] and $_POST['release_date']. Those aren't the variables you are using though.
                they are now though?

                I dont understand how it could work before, its not isolated to this script, every other database adding script I have on the site isn't working in the same way. (apart from vBulletin)

                Comment


                • #23
                  To be honest, I don't know how they were working before when I look at your script. Perhaps it is some server setting that automatically makes $_POST['variable'] into $variable? I remember once when I changed servers, I had to change all my $_POST to $_REQUEST in some custom scripts I had. I don't know enough about server settings to suggest what to look for. You may want to post in the Server Configuration forum and maybe someone in there would know if there is some server setting that you may toggle/set that helps to pass your variables differently? George, or someone else in that forum, may know exactly what to do.

                  Sorry I can't be of more help, Seanie.

                  Please don't PM or VM me for support - I only help out in the threads.
                  vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                  Want help modifying your vbulletin forum? Head on over to vbulletin.org
                  If I post CSS and you don't know where it goes, throw it into the additional.css template.

                  W3Schools <- awesome site for html/css help

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X