1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Simple Php Question

Discussion in 'PHP' started by slaydragon, Jun 7, 2008.

  1. #1
    Hi,

    I have a form in one of my website (www.example.com). In that form, there's 2 fields, one is called Name, other called Email.
    SEMrush
    I input the 2 fields and clicked on submit. I want the data to be stored in a database under another website (www.go.com) instead of www.example.com.

    How do i do this? Advice appreciated. Thanks.
     
    slaydragon, Jun 7, 2008 IP
    SEMrush
  2. Bryce

    Bryce Peon

    Messages:
    1,235
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Databases aren't stored under websites. All you need is a login and the username/password for the target database to insert into it.
     
    Bryce, Jun 7, 2008 IP
    slaydragon likes this.
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,731
    Likes Received:
    26
    Best Answers:
    13
    Trophy Points:
    175
    #3
    or use readfile for sending the information to the other server by sending it as paramters

    example:
    $null = @readfile("http://www.yourdomain.com/save.php?name=" . urlencode($_POST['name']) . "&email=" . urlencode($_POST['email']));
     
    EricBruggema, Jun 8, 2008 IP
  4. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Set up your databases remote access settings, it's normally port 3306 on your domain.

    Dan
     
    Danltn, Jun 8, 2008 IP
  5. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #5
    from cpanel of other site give db access to the IP of of your first site

    Use in the connection the name of other site as server instead of local host

    Regards

    Alex
     
    kmap, Jun 8, 2008 IP