PHP On Another Server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wayneio
Forum Newbie
Posts: 6
Joined: Tue Jan 11, 2011 7:58 am

PHP On Another Server

Post by wayneio »

Code: Select all

<form action="reviews.php" method="post" id="ReviewSubmission">
  <p>Name: 
    <input name="Name" type="text" size="30" />
    </p>
  <p>Category:
    <select name="Category">

      <option value="Log Cabin">Log Cabin</option>
      <option value="Caravan">Caravan</option>
      <option value="Camping">Camping</option>
      <option value="Romany Caravan">Romany Caravan</option>
      <option value="Tipi">Tipi</option>
    </select>

  </p>
  <p>Rating:
  <select name="Rating">
  	<option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>

    <option value="5" selected="selected">5</option>
  </select></p>
  <p>Your Comments:
    <textarea name="Comment" cols="45" rows="5"></textarea>
  </p>
  <p>
    <input type="submit" name="submit" value="Submit Feedback" />
  </p>

</form>

Code: Select all

  <?php
  $name = $_POST['Name'];
  $cat = $_POST['Category'];
  $rate = $_POST['Rating'];
  $comment = $_POST['Comment'];
print"<p>Name: $name</p> <p>Category: $cat</p> <p>Rating: $rate</p> <p>Comment: $comment</p><hr width=100% />"
  ?>
I am new to PHP. These are my 2 pieces of code. They write fine, on my testing server, however my host does not support PHP. My friend is letting me host the PHP file on his server, but how do I get the PHP code to write back to the origional server.

To make it easier, HTML is on server 1, PHP is on server 2. How can i get the form to submit to the PHP, then write a new file back in server 1. This is for a review page. Furthermore, the PHP overwrites the previous review, so how can I get it to ammend the form to the bottom of a page.

Thanks in advance.
wayneio
Forum Newbie
Posts: 6
Joined: Tue Jan 11, 2011 7:58 am

Re: PHP On Another Server

Post by wayneio »

bump
danwguy
Forum Contributor
Posts: 256
Joined: Wed Nov 17, 2010 1:09 pm
Location: San Diego, CA

Re: PHP On Another Server

Post by danwguy »

Only thing I can think of is to use an iframe on your page, or use Server Side Includes on your page. Does your server support aspx?
Post Reply