Jump to content

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> 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.