Jump to content

Archived

This topic is now archived and is closed to further replies.

deadly_silence

HELP: PHP confirmation page

Recommended Posts

Hi,

I'm attempting to install PHPFanList for my fanlisting. I'm having trouble applying it to my website. I think I have figured out how to work the members and the join page, but i'm having trouble with the confirmation page. I need it to get the confirmation page to work when a member joins. I have this code:

<?php
function isrequired($s, $v) {
global $fields_required;
if (in_array($v, $fields_required)) {
echo $s;
}
}
$message = '';
if (($_SERVER['REQUEST_METHOD'] == 'POST') and ($_POST['submit'] == 'Join')) {
reset ($_POST);
while (list ($key, $val) = each ($_POST)) {
if (in_array($key, $fields_required)) {
if (toNULL($val) == 'NULL') {
$message = 'It appears that you forgot something. All fields with * are required. Please click the back-button and try again.';
break;
}
}
}
if ($message == '') {
if (($_POST['url'] == '') or (validate_site($_POST['url']))) {
if (validate_mail($_POST['mail'])) {
$row = fetch_array(query('check_mail', $_POST['mail']));
if (($row['num'] > 0) and (!$settings['allow_doublemail'])) {
$message = 'Sorry, but this email address is already listed in the database. This means that you\'re already listed as a member. If you want to see your listing as a member, please <a href="members.php">click here</a>.';
} else {
include_once('mail.inc.php');
if (query('join', $_POST)) {
$message = 'Thank you ' . $_POST['name'] . ' for joining ' . $settings['site_name'] . '. You will be added to the members list with the next update.';
if ($settings['mail_on_join']) {
do_mail('join');
}
if ($settings['mail_admin']) {
do_mail('admin_join');
}
} else { $message = 'An unknown error occured. Please try again. If the problem keeps occuring, please contact '. $settings['owner_name'] . '.'; }
}
} else { $message = 'The e-mail address you supplied (' . $_POST['mail'] . ') is not valid. Please click the back-button and try again.'; }
} else { $message = 'The website you supplied (' . $_POST['url'] . ') is not valid. Please click the back-button and try again.'; }
}
}
?>

BUT it comes up like it is shown above when i try and view it.

Help would be greatly apprecieted because I will be away tomorrow onwards and the fanlisting is due while i'm away. Please, please help!

Thanks very much!

Share this post


Link to post
Share on other sites
Do you mean the text comes up exactly as you typed it?

If that is the case you have a problem with your installation of php. Or it could be you did not name the file *.php. Unless you have modified your default web server installation you need to name the files *.php in order for php to parse the script.

Ray

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.