PHP post programmatically
Posted
by
Tural Teyyuboglu
on Stack Overflow
See other posts from Stack Overflow
or by Tural Teyyuboglu
Published on 2011-11-14T17:34:28Z
Indexed on
2011/11/14
17:50 UTC
Read the original article
Hit count: 213
After user registration, website send activation code to email. something like that. www.domain.com/?activate=<code>
I'm creating 2 variants of activation: 1.manual 2.auto Lets say we have index.php.
1.Manual method. When someone wants to activate user manually all things are obvious:
User opens page www.domain.com/?activate
Index.php
checks with following script and includes div file (which
contains activation form)
if (isset($_GET['activate'])) {
$page='activate';
$divfile = 'path to div.php';
}
include $divfile;
Then page sends form data via ajax to activation.php
file.
2.Auto method. Lets say user clicked directly to www.domain.com/?activate=<code>
. What I wanna do is, to check if(!empty($_GET['activate']))
, if all right ... I can't figure out how to act?! Programmatically send something like POST to activation.php
or what? Please help. Thx in advance
© Stack Overflow or respective owner