| 1 |
<? |
<? |
| 2 |
|
session_start(); |
| 3 |
|
session_name("GPG-Coord"); |
| 4 |
include("gpgconfig.inc"); |
include("gpgconfig.inc"); |
| 5 |
include("common.inc"); |
include("common.inc"); |
| 6 |
|
|
| 27 |
return FALSE; |
return FALSE; |
| 28 |
} |
} |
| 29 |
|
|
| 30 |
|
if ($offer == "on") { |
| 31 |
|
$offer = "TRUE"; |
| 32 |
|
} else { |
| 33 |
|
$offer = "FALSE"; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
$now = strftime('%Y-%m-%d'); |
$now = strftime('%Y-%m-%d'); |
| 37 |
$sql = "INSERT INTO people (forename, surname, email, passwd, offer, last_update) VALUES ('$forename', '$surname', '$email', '$passwd', $offer, '$now')"; |
$sql = "INSERT INTO people (forename, surname, email, passwd, offer, last_update) VALUES ('$forename', '$surname', '$email', '$passwd', $offer, '$now')"; |
| 38 |
if (! ($result = pg_exec($db, $sql))) { |
if (! ($result = pg_exec($db, $sql))) { |
| 39 |
echo "Problem with query", pg_ErrorMessage($db), "<BR>"; |
echo "Problem with query", pg_ErrorMessage($db), "<BR>"; |
| 40 |
return FALSE; |
return FALSE; |
| 41 |
} else { |
} else { |
| 42 |
echo "OK."; |
echo "OK, you have been registered."; |
| 43 |
|
|
| 44 |
|
$s_username = $email; |
| 45 |
|
session_register("s_username"); |
| 46 |
|
|
| 47 |
|
echo " Click <A href=\"gpgmain.php?\""; ?><?=SID?><? |
| 48 |
|
echo ">here</A> to add new entries."; |
| 49 |
} |
} |
| 50 |
|
|
| 51 |
} |
} |