Jump to content

Help needed inserting .php mailing list code into html page


robotta1530

Recommended Posts

Hi, I havent got a clue about php, and not much of a clue about html - but i have managed to make a simple website and I need help integrating the following code into my index page. I have inserted it and changed the file to .php but none of the code looks active, ie not coloured and the email.txt file I have created does not get updated. Also when i view the page in a browser part of the code appears to the left - ,");?>

 

This is the original webpage that i want to add the code to;

www.robertlang.co.uk/index2.htm

 

Any help would be very welcome

 

 

The mailing list code is:

 

<?php

$database = "emails.txt";

$file = fopen($database, "a+");

$size = filesize($database);

$name = $_POST['name'];

$email = $_POST['email'];

if($_POST['submit']) fwrite($file, "\"$name\" <$email>,");

?>

 

<form method="post">

<p align="center"><b><font face="Arial">Email</font></b>: <input type="text" name="email" size="20"><input type="submit" value="Subscribe" name="submit">

</p>

<p align="center"><br /><br />

 </p>

 

</form> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.