PHP And Codes!

Cool Cr@cker

I am now Chrono Cr@cker
  • 1,778
    Posts
    21
    Years
    Guys well I programmed some Webpages but Unfortunately PHP isnt working in my System--Not even the Basic <include Tag!!Dont Know what's wrong.Do I need to install some Files!

    And One More thing------I Am Having A short Submit your works form!When I give it like this
    <form method="post" action="mailto:[email protected]">etc The Form well Emails from the person's Comp!Can anybody give me a better Code!!
    Which'll just Send it Directly with 1000 Are you sure...!Is there anything I can do so that it Just Sends it to me!
    Thanks again
    ------------------------------------------------
    CC
     
    1st Question: To get PHP working on your system, you must install Apache and PHP and you might as well install MySQL while you're at it. Here's a up to date tutorial showing how to install these.
    https://www.php-mysql-tutorial.com/install-apache-php-mysql.php
    2nd Question: So you want a form to send to yor email address? Well, here's a form in PHP:
    PHP:
    <?php
    if ($HTTP_POST_VARS){
    $name = $_POST['name'];
    $email = $_POST['email'];
    $text = $_POST['body'];
    $body = 'From: '."$email".'\n'."$text".'; 
    mail("[email protected]","Subject","$body");
    }
    ?>
    <form name="form" method="post" action="mail.php">
    <p>Name: <input type="text" name="name"></p>
    <p>E-Mail: <input type="text" name="email"></p>
    <p>Text Area:<textarea name="news" cols="50" rows="6" id="body"></textarea></p>
    <input type="submit" name="Submit" value="Submit">
    </form>
    If you tell me what you want in the form, I can customize it for you or you can do it yourself.
     
    Cool Cr@cker said:
    Guys well I programmed some Webpages but Unfortunately PHP isnt working in my System--Not even the Basic <include Tag!!Dont Know what's wrong.Do I need to install some Files!
    ...

    You are aware that it's:
    PHP:
    <? include(); ?>
    ...right?
     
    Kip-kip said:
    1st Question: To get PHP working on your system, you must install Apache and PHP and you might as well install MySQL while you're at it. Here's a up to date tutorial showing how to install these.
    https://www.php-mysql-tutorial.com/install-apache-php-mysql.php
    2nd Question: So you want a form to send to yor email address? Well, here's a form in PHP:
    PHP:
    <?php
    if ($HTTP_POST_VARS){
    $name = $_POST['name'];
    $email = $_POST['email'];
    $text = $_POST['body'];
    $body = 'From: '."$email".'\n'."$text".'; 
    mail("[email protected]","Subject","$body");
    }
    ?>
    <form name="form" method="post" action="mail.php">
    <If you tell me what you want in the form, I can customize it for you or you can do it yourself.[/QUOTE]
    
    Thanks Kip--Should This be in a file Called mail.php!!
    Thanks PSB too.And Greg Yah I know it-Infact it wasyou who taught me this!
     
    Cool Cr@cker said:
    Thanks Kip--Should This be in a file Called mail.php!!
    Thanks PSB too.And Greg Yah I know it-Infact it wasyou who taught me this!
    Yes. You would put all of it in a file called mail.php.
     
    Back
    Top