Page 1 of 1

PHP On Another Server

Posted: Wed Mar 02, 2011 8:01 am
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.

Re: PHP On Another Server

Posted: Thu Mar 03, 2011 11:01 am
by wayneio
bump

Re: PHP On Another Server

Posted: Thu Mar 03, 2011 1:11 pm
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?