Okay, I have a database that I need to add information to

I have a login/password that I expect is checked as part of the process, but here is the information I need to pass

my url is different than the DB url
http://site1.com/postdata -- sending info to
http://site2.org/SOAPpage

login => bob
pass => bob123
datafield1 => email@address.com
datafield2 => numeric
datafield3 => textarea info with spaces, punctuation, etc

Can someone please explain SOAP process, and possibly give an example PHP code that would insert this to the DB-- I know it wont be exact but it would give me a great start to see it rather than hear vague explanations

I did search and found quite a few unanswered posts, the ones i did open did not resolve my issues unfortunately

    Your post is very confused. As far as I know, DB's don't have URLs. DBs generally live on a server somewhere and you have to connect to the DB server to ask for information about what's in the DB using a connection protocol that is NOT http.

    I have no idea what http://site2.org/SOAPpage is there for. You just listed it without any explanation. You show us some data but don't explain where it's coming from or where it's going.

    And then you ask about SOAP? You may find the PHP documentation on SOAP useful.

      I have read the PHP documentation on SOAP, and it is confused

      MY URL is different than the site URL that hosts the DB which I am posting the data

      from the PHP documentation I assumed that I need a specific line stating what URL I am dealing with when posting to the database inserted in the function

      I am basically looking for a tutorial on how to post to a DB using SOAP, and read the reply sent from the site hosting the DB (also provided by SOAP call)

        Connecting to a database on another server is a bit tricky. First you don't use a URL to get to it, you connect via IP address.

        $location = "192.168.0.1"; //that's a dummy IP address but you get the idea
        $username = "username";
        $password = "password";
        $database = "database";
        $open_db = mysql_connect("$location","$username","$password");
        mysql_select_db($database,$open_db)
        

        But above that you need to makes sure the database on the other server is set to execute code from a different server. Most databases by default will not execute code from a different server.

        As for SOAP I don't think it can do what your wanting it to do.

          I was told specifically it was a "SOAP function" but the guy who runs the other site is an idiot... not in business, but as far as advanced web programming

          I will check on if I can get the IP and go from there, that would make it so much easier 😛

          thanks -- guess I need to get more specific with him

            Write a Reply...