PDA

View Full Version : PHP e-mail that goes directly into db



tejas
01-21-2004, 02:12 PM
I am new to PHP programming. On my site, i asking users to login, but it is just a simple e-mail form, which comes into my inbox.

this is what i would like to do:
when user logs in, their information gets stored in the database and not come into my inbox.

this might be a stupid question, but i am learning :)

I am using ipowerweb as my hosting service.

By the way, this is my first post and i find this forum very useful, so i thank you all.

Keep it up.

Looking forward to your responses.

Tejas

cyanide
01-21-2004, 04:55 PM
Hi tejas,

Welcome to WebProWorld,

Can you clarify what you mean by logging in ??

If this log in is just sending you an email, then what exactly are they logging into ? I don't quite understand.

Maybe you can provide a link also ?

httpman
01-21-2004, 05:56 PM
Not so easy to achieve, unless someone can find a free PHP script that does it ?

Here is what you have to do :

1- don't send the form to an e-mail, but send it to a PHP page

2- use that PHP page to read the form's fields. Here is the PHP code for that :

<?
foreach($HTTP_POST_VARS as $name=>$value) $$name=$value;
foreach($HTTP_GET_VARS as $name=>$value) $$name=$value;
?>

This will store your form's fields values into the $fieldsname PHP variables. Regarding the *method=* of your form, you will get the fields via the *http_post_vars* or *http_get_vars* line.

3- Now that you have the values within PHP variables, just store them into your PHP database...

JP