Peter Law wrote:
> I am learning Php and have a web site host where scripts have to be in the
> cgi-bin. What is put in the original web page to call a script from the
> cgi-bin? The info from the web host is below.

Something like this may be useful to you:

Make two files.

Name one of them: form.html

Put this in it:

<HTML><BODY>
  <FORM ACTION="/cgi-bin/form_processor.php" METHOD="POST">
    <INPUT NAME="name"><BR>
    <INPUT TYPE="SUBMIT" VALUE="What's your name?">
  </FORM>
</BODY></HTML>

Name the second file: form_processor.php

Put this in it:

<?php
  if (isset($_POST['name'])){
  ?>
    Hello, <?php echo $_POST[name]?><BR>
    Welcome to my website!
  <?php
  }
?>

Now, upload the HTML page to the HTML part of your site, but put the PHP
page in your cgi-bin part of your site.

Visit the HTML page, and it *SHOULD* invoke the PHP page when you submit
the form.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to