1 Reply Latest reply on Feb 3, 2009 8:51 AM by commuterkid

    Submit Data to Other Tables via PHP

    commuterkid

      Title

      Submit Data to Other Tables via PHP

      Post

      Hello.  I have one main table named "Contacts" and another small table named "ZipCodes."  The relationship is 1-to-many and the Zip field is the only one connecting to the Contacts table.  After publishing thru PHP Site Assistant, I have submitted a new record, but all I get is an "Error 510 - Related or empty value is zero." I get this when I enter in information into the City, State, and Country fields (which are in the ZipCodes table).  

       

      When I don't enter in any City, State, or Country, the record submits fine.  How do I get these fields to talk with the Contacts table?

       

      Thanks!

        • 1. Re: Submit Data to Other Tables via PHP
          commuterkid
            

          Ok, so after playing around a little, I discovered the "PHP Include" and I am wondering if there is a way to include multiple layouts into one PHP file.  I have 2 layouts, Contacts and ZipCodes. My main PHP page to add a record is Contacts and I want to include the ZipCodes PHP file into Contacts so that when I hit the submit button, it will add the record from Contacts to the database and whatever is entered from the ZipCodes.  I hope this makes sense.  Please let me know if I need to clarify better.