Solved

Website Communication

Posted on 2015-01-23
7
57 Views
Last Modified: 2015-02-11
I have two websites.  They are both run on the Expression Engine CMS.
Lets Call them site A and site B.
Site A you fill out a form and hit enter.  First name last name and State.  That information needs to be sent to Site B.  On site be, depending upon the Stae you live in, You will be presented with products and prices.

What is the best way to send this information or any information real time from one site to another?
0
Comment
Question by:rgranlund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40567291
Why don't you just POST it from the form on A to the PHP page on B?
0
 
LVL 7

Author Comment

by:rgranlund
ID: 40567296
What about if I wanted to send info straight to site B's Database?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40567376
That would still be the best way.  Technically it has to go thru a PHP page since an HTML page can not connect to the database directly.  Just make the 'action' attribute in the form on site A be the page you need on site B.  That is done all the time.
0
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
LVL 7

Author Comment

by:rgranlund
ID: 40567429
I should ask this question a different way.  If info is entered into Site A's Database, can I use an XML field or something similar to automatically transfer that info into the Database of Site B? I want both DB's to have the same info.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40567444
Yes, that is a different question.  Are the database tables the same on both sites?  Is the database server on site B remotely accessible from site A?  If that is true, then you can just run the same insert query but use two different connections.  One for A and one for B.
0
 
LVL 7

Author Comment

by:rgranlund
ID: 40568391
That makes sense.  Can you briefly elaborate on "Use two different connections"
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40568490
Every connection is only to one server.  To connect to a second server, you must make a second connection.
// first MySQL server
$link1 = mysqli_connect("myhost","myuser","mypassw","mybd") or die("Error " . mysqli_error($link1));
// second MySQL server
$link2 = mysqli_connect("myotherhost","myotheruser","myotherpassw","myotherbd") or die("Error " . mysqli_error($link2));

Open in new window

0

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question