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.

Form Script

Discussion in 'PHP' started by genius, Feb 9, 2009.

  1. #1
    Hello,

    I tried to make a form with the following script

     <form action="contact.php" mehod="post">
                          <table width="75%" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td width="50%"> 
                                <h5> 
                                  <p><label for="name">Name </label></p>
                                </h5>
                                <p><label for="name"> 
                                  <input name="name" id="name" />
                                  </label></p>
     <input type="submit" name="submit">
    </form>
    
    PHP:
    Then I have another script that something like :

    <?PHP $name=$_REQUEST['name'];
    $adress=$_REQUEST['adress'];
    $mail=$_REQUEST['mail'];
    $msg=$_REQUEST['msg'];
    #trimite mail-ul
    mail($to,$re,$msg);
    $to = "mail";
    $re = "subject";
    $msg = "Nume: $nume\n Subiect: $subject\n Email: $mail\n Comentarii: $mesaj\n\n IP : $REMOTE_ADDR";
    ?>
    PHP:
    I doesn't seem to work , do you have another ideea about another script ?
     
    genius, Feb 9, 2009 IP
  2. vipinc007

    vipinc007 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Put the line "mail($to,$re,$msg);" at the end.
    and please provide valid email to the "$to" variable.

    Also please see that the variable that u use are valid or defined.
     
    vipinc007, Feb 9, 2009 IP