Jump to content

Registration Form


wicksmagic

Recommended Posts

I'm looking to add three things on the registration form on my forum.

 

1.  I would like the members to be able to put in profile information right from the registration page.

 

2.  I would like the members to be able to invite friends right from the registration page.

 

3.  I would like to have a box on the registration page where the members can say how they found the page or who referred them.

 

Thank you in advance to all.

 

John

Link to comment
Share on other sites

I think I may have started off on the wrong foot and I apologize.  I want to preface this with the fact that I'm a complete newbie with php.  I have since discovered that I can make custom profile fields in the ACP which I tried to do for a referral box on the registration page.  Unfortunately I'm now getting this error when I click on 'profile type specific options'.

 

General Error
SQL ERROR [ mysql4 ]

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' [1267]

SQL

SELECT field_ident FROM phpbb_profile_fields WHERE field_ident = 'how did you hear about usʔ'

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/acp/acp_profile.php
LINE: 616
CALL: dbal_mysql->sql_query()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_profile->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()

 

Thank you.

Link to comment
Share on other sites

Here some think quick your need to add validation ok...

 

friend request.......

 

test it ok.....

 

<html>
<head>
<title>Invite My Friends</title>
</head>
<body>

<center>
<h1>Inviting My Friends</h1>
</center>
<?php

if(isset($_POST['number_friends'])){

$number=$_POST['number'];
$x=$_POST['x'];
$email=$_POST['email'];
    $self=$_SERVER['PHP_SELF'];

if($number>0){

	echo "<center>Please provide the email address <br><br>";

       echo "<form method='POST' action='$self?email=friend'>";

       for($i=1; $i<$number+1; $i++){

		echo "Valid email address  <br><br> Friend $i<br><input type='text' name='email[]'><br><br>";
	}

	echo"<input type='submit' name='Friend Request' value='Freiend Request'></center>";

	exit;
}
 }


  if($_GET['email']=="friend"){


 	foreach($_POST['email'] as $the_emails){


$Email='me_website@what-ever.com'; 

$Messages='Hi there mate join this website it grate <br><br> http://www.what_ever_website.com';

    
    $to = $the_emails; 

$subject = 'You got a request to join my website from a friend please read'; 




$mes = "Hello; mate <br><br> You have recieved an email from $Email <br><br>";
$mes .= "This message below is for your convenience. <br><br> ****************************** <br><br> Full Name: ";
$mes .= " ";
$mes .= "<br><br>";
$mes .= "";
$mes .= "";
$mes .= "";
$mes .= "Message: ";
$mes .= $Messages;
$mes .= "<br><br>****************************** <br><br>This Is An Automatically Generated Message, Do Not Repond!";

$message = $mes; 



$headers = 
        'X-Mailer: PHP/' . phpversion() . "\r\n" .
        "MIME-Version: 1.0\r\n" .
        "Content-Type: text/html; charset=utf-8\r\n" .
        "Content-Transfer-Encoding: 8bit\r\n\r\n";



if(mail($to, $subject, $message, $headers)){



echo " MAIL WAS SENT TO $to! <br><br>"; 

}else{



echo " SORRY NO MESSAGE SENT TO $to <br><br>";


}

 }

  }	 


?>

<center>
<form method="POST" action="<?php $_SERVER['PHP_SELF']?>">

Home meny friends please

<br><br>

<select name="number">

<?php

for ($i=1; $i<11; $i++){

echo "<option value='$i'>$i</option>";

}
?>

</select>

<br><br>

<input type="submit" name="number_friends" value="Number Of Friends">
</center>

</body>
</html>

Link to comment
Share on other sites

Have a look at the code and break it down, some of it will need to go into your registration page, and the rest will need to go into your form validation page (where you add your new users).

 

The way the code is set out at the moment, it is made for a single page to invite friends, try it out and see (i'd use your email address) otherwise random friends will be getting emails!

Link to comment
Share on other sites

Have a look at the code and break it down, some of it will need to go into your registration page, and the rest will need to go into your form validation page (where you add your new users).

 

The way the code is set out at the moment, it is made for a single page to invite friends, try it out and see (i'd use your email address) otherwise random friends will be getting emails!

 

I've already mentioned above but I'm a complete newbie to all this.  Breaking down the code is unfortunately not really an option for me at this point.  I know it's like reading something in your native language for most of you however it's completely foreign to me.  If anybody can tell me exactly what I need to do it would be greatly appreciated.   

Link to comment
Share on other sites

If you wanna do some changes to phpBB forum, I know that it has tons of mods. Which means you can ask them (phpBB) and they tell you what mod to install. again which means you don't have to go to much trouble changing codes yourself.

 

That would be the best solution for you

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.