I am looking for a script that allows my visitors to recommend my website. The scripts I have come across are fairly involved and I just want a really simple click and send procedure...nothing fancy.
Thanks for the help!
I am looking for a script that allows my visitors to recommend my website. The scripts I have come across are fairly involved and I just want a really simple click and send procedure...nothing fancy.
Thanks for the help!
I'm afraid that this sort of script is invariably going to involve server-side scripting, though it needn't be too involved. What server-side languages do you have enabled on your server?
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
What are you asking? A comment? A recommend to a friend thing? A way to copy a link to your site? What?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
A recommend to a friend thing?
I am trying to understand PFP to make this work...
Do you mean PHP? Well, if you do, PHP is pretty simple to learn, especially if you want to make your own "Recommend This Site" script. I made a couple a while back and I believe I posted them on here, but I can't seem to find them. Basically, all you need to accomplish this is use a HTML form with a few fields. After that, you need the PHP script to process the data submitted and send a message to either just the one person, or mulitple persons at one time by email. Let me know if you need any further help on it.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Yes, PHP (oops).
Here is the code I am using as a reference:
<head>
<script>
var ns6=document.getElementById&&!document.all
function restrictinput(which, maxlength, e){
if (document.all&&which.value.length>=maxlength){
return false
}
else if (!document.all&&which.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
return false
}
}
function checklength(what){
if (what.message.value.length>200){
alert ("Please restrict personal message to <200 characters")
what.message.focus()
return false
}
}
function alertdefault(){
alert('This is an email from your friend recommending to you our site http://www.dynamicdrive.com Dynamic Drive is the #1 DHTML site online, featuring 100s of free, original DHTML scripts to enhance your site. Visit us at http://www.dynamicdrive.com')
}
</script>
</head>
<body>
<body topMargin=3 marginheight=3>
<form action="sitesuggest.php" method="post" onsubmit="return checklength(this)">
<table border="0" width="100%" cellspacing="0" cellpadding="2" bgcolor="#000080" height="28">
<tr>
<td width="100%"><b><font size="2" face="Verdana" color="#FFFFFF"> Recommend
DynamicDrive.com to a friend</font></b></td>
</tr>
</table>
<p><font face="Verdana" size="2">Please use the below form to recommend Dynamic
Drive to your peers and co-workers! You can recommend
up to 5 friends at once:</font>
<b><br><font color="#FFFFFF"><small>.</small></font></b></p>
<div align="center">
<center>
<div align="center">
<table border="0" width="450" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<table border="0" width="450" cellspacing="0" cellpadding="3">
<tr>
<td width="50%">
<p align="center"><b>Your name</b></td>
<td width="50%">
<p align="center"><b>Your E-mail address</b></td>
</tr>
<tr>
<td width="50%">
<p align="center"><input type="text" name="userName" size="20"></td>
<td width="50%">
<p align="center"><input type="text" name="userEmail" size="25"></td>
</tr>
<tr>
<td width="50%"><font color="#FFFFFF" size="1">.</font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%">
<p align="center"><b>Friend's name</b></td>
<td width="50%">
<p align="center"><b>Friend's E-mail address</b></td>
</tr>
<tr>
<td width="50%">
<p align="center"><input type="text" name="friendName[]" size="20"></td>
<td width="50%">
<p align="center"><input type="text" name="friendEmail[]" size="25"></td>
</tr>
<tr>
<td width="50%">
<p align="center"><input type="text" name="friendName[]" size="20"></td>
<td width="50%">
<p align="center"><input type="text" name="friendEmail[]" size="25"></td>
</tr>
<tr>
<td width="50%">
<p align="center"><input type="text" name="friendName[]" size="20"></td>
<td width="50%">
<p align="center"><input type="text" name="friendEmail[]" size="25"></td>
</tr>
<tr>
<td width="50%">
<p align="center"><input type="text" name="friendName[]" size="20"></td>
<td width="50%">
<p align="center"><input type="text" name="friendEmail[]" size="25"></td>
</tr>
<tr>
<td width="50%">
<p align="center"><input type="text" name="friendName[]" size="20"></td>
<td width="50%">
<p align="center"><input type="text" name="friendEmail[]" size="25"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center">
<p align="center"><br>
<b><a href="#" onClick="alertdefault();return false">View Default message added</a></b><br>
<br>
<b>Add your personal message (optional):</b><br>
<textarea rows="4" name="message" cols="32" wrap="virtual" onkeypress="return restrictinput(this, 200, event)"></textarea></p>
<p align="center"><input type="submit" value="Recommend Dynamic Drive" name="B1">
</td>
</tr>
</table>
</div>
</center>
</div>
</form>
<p align="center"><font size="1" face="Arial">CopyRight © 1998-2002 <a href="http://www.dynamicdrive.com">Dynamic
Drive</a>.</font>
</p>
</body>
What I don't understand is the sitesuggest.php part and how to write that to process the data. I understand it is needed, but I just don't know how to proceed.
Thanks again!!!
Give me a little while, see if I can set something up, then I'll post it here (if no one else has done so before.)
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Thanks again...I REALLY appreciate the guidance!!!
Do you mean for the current user to click a button that sends an email to this person they want to suggest your site to?
- Mike
Bookmarks