creating Contact form to email and txt file

Reply

Join Date: Mar 2005
Posts: 2
Reputation: jrbamberg is an unknown quantity at this point 
Solved Threads: 0
jrbamberg jrbamberg is offline Offline
Newbie Poster

creating Contact form to email and txt file

 
0
  #1
Mar 27th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: creating Contact form to email and txt file

 
0
  #2
Apr 10th, 2005
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]
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC