Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: 1 [2]
Send this topic | Print
Topic: A "Contact Me" section without having to give email  (Read 9712 times)
« Reply #15 on: May 02, 2006, 12:46:43 PM »
Bret Craven Offline
Vice President
Administrator
Addict

View Profile
*****
Posts: 693



If you change
Code:
$message = $_POST['message'];
to
Code:
$message = strip_tags($_POST['message']);
is should prevent html from being posted.
Report to moderator   Logged

Bret Craven
  Vice President
  Director of Customer Service
  cravenbw@t35.net

 
« Reply #16 on: May 13, 2006, 09:55:18 AM »
pokeworld
Guest

It said on the php official website that there was a bug ith $_POST
Report to moderator   Logged
« Reply #17 on: May 13, 2006, 12:52:40 PM »
Bret Craven Offline
Vice President
Administrator
Addict

View Profile
*****
Posts: 693



You can switch it to $_GET if you need to.
Report to moderator   Logged

Bret Craven
  Vice President
  Director of Customer Service
  cravenbw@t35.net
« Reply #18 on: May 14, 2006, 07:49:09 AM »
Prove it
toucher Offline
Newbie

View Profile WWW
*
Posts: 15



Well everytime, I get a new comment etc it overwrites the original, is there away to stop that? And can we add an e-mail function so everytime we get a comment we get an automated e-mail telling me?


Thanks
Toucher
Report to moderator   Logged

Touch en Stride]http://toucher.t35.com]Touch en Stride
We are in the Finder search! Search Touch en Stride
« Reply #19 on: May 14, 2006, 01:21:40 PM »
Bret Craven Offline
Vice President
Administrator
Addict

View Profile
*****
Posts: 693



post.php
Code:
<?php

$name 
$_POST['name'];
$subject $_POST['subject'];
$message $_POST['message'];
$type $_POST['type'];
$email $_POST['email'];

$write2file '
Name = '
.$name.'
Subject = '
.$subject.'
Message = '
.$message.'
Type = '
.$type.'
E-Mail = '
.$email.'
'
;

$file2write 'data/'.str_replace (' '''$name).'-'.str_replace (' '''$subject).'.dat';
$write = @fopen($file2write,"w");
@
fwrite($write$write2file);
@
fclose($write);

if(
$write){echo 'Your message has been submitted !';}
else{echo 
'ERROR : Your message has not been submitted !';}
?>
HTML Junk
Code:
<form action="post.php" method="post">
Name<input type="text" name="name"><BR>
Email<input type="text" name="email"><BR>
Subject<input type="text" name="subject"><BR>
Type
<select name="type">
<option value="complaint">Complaint</option>
<option value="suggestion">Suggestion</option>
<option value="question">Question</option>
<option value="idea">Idea for comic</option>
<option value="other">Other</option>
</select><BR>
<textarea name="message"></textarea><BR>
<input type="submit">

</form>

In order to use it this way you need to make a directory under your account called data and chmod it to 777 so that the data can be written into that directory. Once in that directory it will create a file with whatever was entered into the name field and the newly added subject field. It looks like Name-Subject.dat. With a very little amount of work you can set it up to make a new dir for each day in case someone leaves feedback twice with the same subject, otherwise their old one will be over-wrote with the new one.
Report to moderator   Logged

Bret Craven
  Vice President
  Director of Customer Service
  cravenbw@t35.net
« Reply #20 on: May 15, 2006, 10:46:45 AM »
moxie990 Offline
Jr. Member

View Profile
**
Posts: 50



instead of these comments being posted to their own file for the owner to read, is there anyway on a freehosting to get the comments posted near the article or w.e?

like if i write something, is there a way to have a user comment, and then have it automatically added to hte page like below my article?
Report to moderator   Logged
« Reply #21 on: May 15, 2006, 10:52:17 AM »
Bret Craven Offline
Vice President
Administrator
Addict

View Profile
*****
Posts: 693



Yeah. You can use php includes to include a file into the bottom of the file that you post on. Use post.php to post the comments into that file. You're going to have to use a little more then what's there in post.php but it can be done.
Report to moderator   Logged

Bret Craven
  Vice President
  Director of Customer Service
  cravenbw@t35.net
« Reply #22 on: March 04, 2007, 10:04:30 PM »
Qiao828 Offline
Newbie

View Profile
*
Posts: 8



hey im extremely confused about the code you have.  please add my AIm screen name and my email is rxqlacrosse@yahoo.com   the first longer code you offer, where do i put it???  copy and paste it to the textbox when i edit file??? im a newbie please help me
Report to moderator   Logged
« Reply #23 on: March 04, 2007, 10:06:13 PM »
Qiao828 Offline
Newbie

View Profile
*
Posts: 8



hey im a totaly beginner at all this.  please tell me exactly wha tto do to be able to submit things.  i already have a textbox, just want the info entered in the etxbox to be sent to an area where i can open and read it.  Please explain step by step on what to do im so confused.  i have a screen name, qiao828 and my email is rxqlacrosse@yahoo.com  please please respond and help ASAP
Report to moderator   Logged
« Reply #24 on: May 23, 2007, 01:51:06 PM »
It's not the code that's bad, it's the coder.
trecool999 Offline
Newbie

View Profile WWW
*
Posts: 29



Ty, but, for symplicities sake, is there any way to configure the script so that the responce is sent in a email to mariomics@gmail.com? If not, this will work well enough. Thanks again.

The mail() function is all I know of, but due to abuse, it was disabled.
Report to moderator   Logged

I want my RS Account Back
« Reply #25 on: February 20, 2008, 02:24:30 PM »
webhustler Offline
Newbie

View Profile
*
Posts: 11



If you do not want your email to be spammed. I have found an interesting workaround solution for you. It is kind of meesy, as it is not a code solution, but it is great to use for a free host.

Get yourself a free Gmail account to use. Use it only for this purpose.
Set your fee Gmail acount to use the vacation autoresponse function.

Go to http://www.htmlbasix.com/ and create your html form (and clean it up if you know html)ask for as little info from the webvisitor as possible. Use your Gmail address as the reply.

Then go to your Gmail vacation autoresponder and set it up with a message to the effect of "for your protection, we have added an anti-spam communication layer to our website ".

Then use another html form in the email response that is asking all of the information you want to know, and link it to your proper email account.

Once set up, it needs no attendance, helps you to get less spam by removing your main email from the site code and text, helps you to qualify your leads, and make the leads feel safer. 
Report to moderator   Logged
 
Pages: 1 [2]
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC