Can PHP do this?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
marville
Forum Newbie
Posts: 4
Joined: Tue Feb 25, 2003 10:07 pm
Location: Hoboken, NJ

Can PHP do this?

Post by marville »

After the user clicks the button SUBMIT:
a) a Welcome page is shown;
b) a Welcome email is sent to his inbox;
c) the data is retrieved in a database;

I need to send sequential messages to the user's inbox. Thus, I signed for an autoresponder service. I'm supposed to install a simple form with only name and email address to trigger the sequential messages.

Can PHP send only the two fields to the autoresponder service, without installing the proper form (and saving the user the task of filling two forms)?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

*confused*
Can you explain in more detail, I didn't get the point (which might be my fault)
marville
Forum Newbie
Posts: 4
Joined: Tue Feb 25, 2003 10:07 pm
Location: Hoboken, NJ

Can PHP do this?

Post by marville »

Hello, Volka. Dank fur deinem antwort.

This web site http://homeservices-directory.com is under construction.
It's a referral service, catered to home services providers and homeowners. The service providers start registering at the bottom of the page ARE YOU A SERVICE PROVIDER? CLICK HERE!
After Registered the company and press the SUBMIT the system:
a) Retrieves the data in MySQL, for future search;
b) Opens a Thank you Page;
c) Sends a validation (Welcome) message to the Service Provider;

I need to send several messages to that same Service Provider and I can do that by auto-responder. http://www.autorespond-it.com
To do this I have to place another form in order to the Service Provider receive the messages. This form has only two fields: name and email address. But these two fields already are in the first form the Service Provider just filled!

IS IT POSSIBLE PHP register the Service Provider using only those two fields? Remember, PHP in one server already:
a) Retrieves the data in MySQL, for future search;
b) Opens a Thank you Page;
c) Sends a validation (Welcome) message to the Service Provider;
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

ah ic.
e.g. you have this form

Code: Select all

<form method="POST" action="register.php">
	<input type="text" name="name" />
	<input type="text" name="email" />
	<input type="submit" />
</form>
The you retrieve the posted data in register.php via $_POST['name'] and $_POST['email'] (maybe performing some checkings).
(see also: http://forums.devnetwork.net/viewtopic.php?t=511)

inserting the data into a mysql-db then looks like

Code: Select all

$dbConn = mysql_connect( ... );
mysql_select_db( ... , $dbConn);
$query = 'INSERT INTO tablename (name,email) VALUES ('.
	mysql_escape_string($_POST['name']) . ',' .
	mysql_escape_string($_POST['email']) . ')';
mysql_query($query, $dbConn);
(see also: http://www.php.net/manual/en/ref.mysql.php)

then the server has to re-submit the data acting as the client. If the data needs to be POSTed I suggest using a php-class like snoopy since the urlwrapper only handles GET (not much to handle there ;) )
marville
Forum Newbie
Posts: 4
Joined: Tue Feb 25, 2003 10:07 pm
Location: Hoboken, NJ

Can PHP do this?

Post by marville »

Danke schon! Wieviel wollen Sie dieses operation machen?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

pardon?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Meiner deutsche is nicht gut, but he either said "how do I do that then?" or "I'm sorry I have no more donkeys".
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

lmao :lol:
Post Reply