944,087 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5382
  • PHP RSS
Mar 27th, 2005
0

creating Contact form to email and txt file

Expand Post »
Hi, I am kinda new to PHP as I am trying to teach myself with tutorials and it has been a long battle, but I created a signup form using php to send that information to the client successfully using the same idea as this post -->http://www.daniweb.com/techtalkforum...html#post81744 but what I want to do is also make a record of that email writing it to a text file database then later the client would be able to pull it up using something made out of PHP. I know this is asking alot and I'm sure if it is even possible. But reading a lot about the idea of a guestbook and using txt files it would similar to that just with the addition of emailing to the client as well.

Please, please help. Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jrbamberg is offline Offline
2 posts
since Mar 2005
Apr 10th, 2005
0

Re: creating Contact form to email and txt file

Why not use a MySQL database? Easier to manage.

But if not, then you can do something like create a directory that contains all the messages, giving each filename an ID, like 1.txt, 2.txt, or something more uncommon so that they are harder to find, like an MD5 hash of the ID number given to the user.

Then to retrieve it, they can type in their ID # into a field and you can grab the file using this:

[php]// $_REQUEST['id'] contains the ID # of the user (he just put it in to find his message

$dir = './messages/';

$message = file_get_contents($dur . md5($_REQUEST['id']));

print $message;
[/php]
Team Colleague
Reputation Points: 53
Solved Threads: 5
PHP/vBulletin Guru
Gary King is offline Offline
360 posts
since Nov 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP April's Fool
Next Thread in PHP Forum Timeline: Defining a PHP INI variable for entire directory





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC