UKC

HTML Again

New Topic
This topic has been archived, and won't accept reply postings.
 mypyrex 16 Jan 2013
Sorry folks; I keep seeing a lot of references to PHP in regard to creating a web site but I'm not sure how to use it. Can it be used in cinjunction with HTML.

If this is my web page in html:

!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<body>
<body bgcolor=#120860 link="yellow" vlink="red" ><font face="AR BLANCA">
<font size=100 color=#d9a027><big>

<div align="center">

MY WEB SITE<p><font size=5>
<font size=4>
</div>

<form method="post" action="http://homepages.plus.net/cgi-bin/form">
<input type="hidden" name="recipient" value="fred@***mail.com" />
<input type="hidden" name="subject" value="Example email feedback form" />
<p><strong>Your Name:</strong></p>
<input type="text" size="15" maxlength="30" name="realname" />
</p>
<p><strong>Your email address:</strong></p>
<input type="text" size="15" maxlength="30" name="email" />
</p>
<p>Please tell us what you thought about this example feedback form</p>
<input type="radio" name="Thoughts" value="It's great!" />
It's great!<br />
<input type="radio" name="Thoughts" value="It's OK" />
It's OK<br />
<input type="radio" name="Thoughts" value="I don't Like it" />
I don't Like it<br />
<p>Do you have any other feedback?</p>
<textarea rows="15" cols="40" name="Other comments">Enter your comments
here</textarea>
<p>Thanks for your time, click the button below to submit your feedback.</p>
<input type="submit" value="Submit your feedback">

</form>

<a href="page003.html">Next</a><br>
</body>
</html>


how would I put php into it?
 Philip 16 Jan 2013
In reply to mypyrex:

You don't. Php is for server side scripts.
In reply to mypyrex:

It depends entirely what you want to do/ use PHP for within it. One very good use is for inserting the code for headers, footer and menus, so that you there is only one file to update/change for the whole website. The typical way you do this is with this simple code:

<?php
require ('NAME OF FILE.html');
?>

e.g.

<?php
require ('headerandmenu.html');
?>
 Milesy 16 Jan 2013
In reply to mypyrex:

You don't. PHP will still end up up with the email address you have blanked out generated within the HTML.

The easiest suggestion I seen in your other post which I didnt think of myself was use something like gmail and then forward it from within gmail to your regular address.
 Milesy 16 Jan 2013
In reply to Gordon Stainforth:

I am reading between the lines here. He is using the SendMail CGI script in his page to send email but has the problem of the email address showing in plain text which takes him back to the mailto: problem.
 elsewhere 16 Jan 2013
"Hardcode" the email address into the server side script.

Two advantages
1) That way the email address is hidden from the browser or the person completing the contact form.
2) If it is abused the fixed ("hardcoded") hidden email address is spammed but it can't be used to send anonymous email to other recipients. You can't trust the recipient email address or anything in the contact form.
OP mypyrex 16 Jan 2013
In reply to Milesy:
> (In reply to Gordon Stainforth)
>
> I am reading between the lines here. He is using the SendMail CGI script in his page to send email but has the problem of the email address showing in plain text which takes him back to the mailto: problem.

I think that's it. I might try the Gmail solution.
 Milesy 16 Jan 2013
In reply to elsewhere:

It isnt his sendmail script. He is using one which I assume is provided for use by his provider. There is already to safeguards on his particular scripe to prevent unauthorised use.
OP mypyrex 16 Jan 2013
In reply to Milesy:
> (In reply to mypyrex)
>

> The easiest suggestion I seen in your other post which I didnt think of myself was use something like gmail and then forward it from within gmail to your regular address.

I have a googlemail.com account but I'm not sure how I get it to "forward"

OP mypyrex 16 Jan 2013
In reply to Milesy: Found it
In reply to mypyrex:

It's within the settings menu.

I'd also suggest that you look at putting your styles in an external stylesheet and hooking them in to the html:

CSS =>
body {
backgroundcolor: #120860;
font-family: "AR BLANCA";
font-size: 1em;
}

For things other than html tags or special instances use classes
CSS =>
.special{
}

html =>
<div class="special">

Plenty of tutorials on the web.

ALC
 Brass Nipples 16 Jan 2013
In reply to mypyrex:

W3schools is your friend
In reply to A Game of Chance:

A quick search for Pipex CGI scripts shows that people were complaining about the mailing script being old and not fit for purpose (i.e. spam trapping) four years ago!

In your situation I'd go with the gmail option I posted on your first thread.

ALC
OP mypyrex 17 Jan 2013
Not sure if I've got this right. I've set my Gmail account so that anything sent to "me@gmail.com" goes instead to "me@abcd.plus.net". In the web page I've put "mailto="me@gmail.com"". Surely all that will do, when the bots start harvesting, is to send the spam to "me@abcd.plus.net". Or am I missing something?
 Milesy 17 Jan 2013
In reply to mypyrex:
> Not sure if I've got this right. I've set my Gmail account so that anything sent to "me@gmail.com" goes instead to "me@abcd.plus.net". In the web page I've put "mailto="me@gmail.com"". Surely all that will do, when the bots start harvesting, is to send the spam to "me@abcd.plus.net". Or am I missing something?

There is no guarantee your address will be harvested. There isnt an army of robotic programs sitting in a dark alley just waiting on mypyrex putting his site live

1. Let Gmail do spam filtering.
2. No one knows your real address except personal reasons.
3. Once you are finished with the purpose you are doing or spam becomes too much. Close the gmail account and move on, or open one with a new address that isnt in the public domain.

A lot of email address harvesting is done by sheer brute force. So programs will attempt to send emails to

joebloggs@blah, joebloggs1981@blah, joebloggs1982@blah, joebloggs1983@blah, joesephbloggs1981@blah etc using a variety of common names, numbers, years and other parameters. Any email addresses which dont return a "recipient not found" from the server may be marked as "exists" by the program... spam is sent with a "stop sending me spam" link. You click the link and the program database can register "in use".

Just create your address. Stick it up. Stop worrying and get on with things
 tlm 17 Jan 2013
In reply to mypyrex:

I've got my e-mail address up all over the shop and get very little spam. It takes years for them to build up, and then you can simply change your e-mail address.

Have fun, and worrying will not give you more control over a chaotic world. Just enjoy rolling with the waves and seeing what life will bring to you.
OP mypyrex 17 Jan 2013
In reply to tlm & milesy: Thanks. I'll give it a go
 EeeByGum 17 Jan 2013
In reply to Milesy:

> There is no guarantee your address will be harvested. There isnt an army of robotic programs sitting in a dark alley just waiting on mypyrex putting his site live

Ummm - I think there is. I have a rather rare sirname. As a result, I never really get spam. However, since my works email address has been published on our company site, I have been inundated. That said, our works email runs through GMail and their spam filters are exceptional.
 Milesy 17 Jan 2013
In reply to EeeByGum:

You just answered that yourself. You get spam because the address is listed on a company site. Your company site is much more likely to get crawled than mypyrex's home website. My address is on my own personal website and I dont get much spam at all and my site has been up and running for nearly ten years.

New Topic
This topic has been archived, and won't accept reply postings.
Loading Notifications...