Jump to content


Photo

HELP: PHP confirmation page


  • Please log in to reply
3 replies to this topic

#1 deadly_silence

deadly_silence
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 April 2006 - 02:47 PM

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!



#2 deadly_silence

deadly_silence
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 April 2006 - 03:24 PM

Any help would be greatly appreciated

#3 deadly_silence

deadly_silence
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 11 April 2006 - 04:29 PM

does anyone know where i can find out this info?

#4 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 11 April 2006 - 06:12 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users