+ Reply to Thread
Results 1 to 4 of 4

Thread: HTML or PHP

  1. #1
    rs.top is offline x10Hosting Member rs.top is an unknown quantity at this point
    Join Date
    Oct 2008
    Posts
    52

    HTML or PHP

    Well, I am making a contact form for people to apply for staff on my game. I am wanting to make it so it requires them to pick certain options. I also want it to show them that their IP is being recorded and with the message, send the persons IP (TO ban spamming IPs). I was wondering how I do this! If can be php or HTML, I don't mind =D/ If a mod or staff sees this, please rename topic to "PHP or HTML, required form options" and then delete this part! Thanks!
    Last edited by rs.top; 12-27-2008 at 08:12 AM.

  2. #2
    tttony's Avatar
    tttony is offline x10 Sophmore tttony is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    ~ 10°10'27.10''' N 67°59'59'.59''' O elev. 457m
    Posts
    147

    Re: HTML or PHP

    you need php and html, php save the data, html show the form and data, here there is a example of contact form with php:

    http://www.ibdhost.com/contact/
    PHP & MySQL Web Developer
    Free Domain co.cc

  3. #3
    rs.top is offline x10Hosting Member rs.top is an unknown quantity at this point
    Join Date
    Oct 2008
    Posts
    52

    Re: HTML or PHP

    I am looking at the code for that, and would it work just to add <code><?php
    $ipi = getenv("REMOTE_ADDR");
    $httprefi = getenv ("HTTP_REFERER");
    $httpagenti = getenv ("HTTP_USER_AGENT");
    ?>

    <input type="hidden" name="ip" value="<?php echo $ipi ?>" />
    <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
    <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />

    </code> instead of having to rewrite the whole thing?
    Last edited by rs.top; 12-27-2008 at 08:29 AM.

  4. #4
    t2t2t's Avatar
    t2t2t is offline x10 Elder t2t2t is an unknown quantity at this point
    Join Date
    Sep 2006
    Location
    Europe, Estonia
    Posts
    690

    Re: HTML or PHP

    You really don't need to have ip included in form (besides the reason of it could be changed), just have it in mail text, etc:
    PHP Code:
    mail('caffinated@example.com''My Subject'wordwrap("Line 1\nLine 2\nLine 3"70)); 
    to
    PHP Code:
    mail('caffinated@example.com''My Subject'wordwrap("Line 1\nLine 2\nLine 3\nIP: {$_SERVER['REMOTE_ADDR']}"70)); 
    (Note that {$_SERVER['REMOTE_ADDR']} only works in case of double quotes, for single ones use:)
    PHP Code:
    mail('caffinated@example.com''My Subject'wordwrap('Line 1\nLine 2\nLine 3\nIP: '.$_SERVER['REMOTE_ADDR'], 70)); 
    This post has been marked spam 52 times.


+ Reply to Thread

Similar Threads

  1. Corriendo una funcion de php en file html
    By oregonsv in forum Ayuda Web
    Replies: 11
    Last Post: 10-28-2008, 01:19 PM
  2. HTML + JS in PHP
    By oxyshow in forum Programming Help
    Replies: 3
    Last Post: 07-30-2008, 04:03 PM
  3. Ads in basic PHP (HTML)
    By fmjnax in forum Free Hosting
    Replies: 4
    Last Post: 05-01-2008, 12:23 PM
  4. Including PHP script in HTML
    By chrisv in forum Free Hosting
    Replies: 7
    Last Post: 08-31-2007, 08:10 PM
  5. php vs html
    By conmark in forum Scripts & 3rd Party Apps
    Replies: 25
    Last Post: 07-12-2005, 02:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers