PDA

View Full Version : Registration



RyanPianesi
30 Jul 2010, 12:54 AM
Ok, im running Wordpress, and Mybb on my website. i would like to know if there is a way, to make a form, that post's to the registration?

Like on the hompage, i made on that does the login, but i dont know how to do the registering part.

Basically, i want it setup, so there is an external registration form...that still sends the information to the forum.

My website is http://rpcomputer.110mb.com (http://rpcomputer.tk)

sandy_j_sam
19 Aug 2010, 03:00 AM
Hi here we mention the Registration code that's help you,
see them

<?php
if(isset($_POST['posted'])=='true')
{
$connect=mysql_connect('localhost','root','');
$db=mysql_select_db('dir_db',$connect);

$name=$_POST['dir_name'];
$title=$_POST['dir_title'];
$company=$_POST['dir_company'];
$email=$_POST['dir_email'];
$phone=$_POST['dir_phone'];
$address=$_POST['dir_address'];
$website=$_POST['dir_website'];
$notes=$_POST['dir_notes'];
$search_conent=$_POST['dir_search_content'];

// Now, We Perform Saving Operation.
if(isset($_POST['dir_save']) == 'Save')
{
$query=mysql_query("INSERT INTO dir_registration(name,title,company,email,phone,address,website,notes) VALUES('$name','$title','$company','$email','$phone','$address','$website','$notes')",$connect);
}

//Now We Perform Cancel operation.
if(isset($_POST['dir_cancel']) == 'Cancel')
{
exit();
}
// Now We Perform Reset operation.
if(isset($_POST['dir_reset']) == 'Reset')
{
$name = '' ;
$title = '' ;
$company = '' ;
$email = '' ;
$phone = '' ;
$address = '' ;
$website = '' ;
$notes = '' ;
echo 'Sai Ram, Sucessfully record Reset';
}
// Now We Perform Search Operation.

if(isset($_POST['dir_search'])=='Search')
{
$query=mysql_query("SELECT * FROM dir_registration WHERE name LIKE '%$search_conent%'",$connect);
while($row = mysql_fetch_array($query))
{
$column1=$row['name'];
$column2=$row['title'];
$column3=$row['company'];
$column4=$row['email'];
$column5=$row['phone'];
$column6=$row['address'];
$column7=$row['website'];
$column8=$row['notes'];
}

}
//Now We Perform Deletion Operation

if(isset($_POST['dir_delete']) == 'Delete')
{
echo "Hiii";
$query = mysql_query("DELETE FROM dir_registration WHERE name= '$name' ",$connect);
}

}
?>
<form name="registration_dir" method="post" action="registration_dir.php">
<div align="left">
<input type="submit" name="dir_search" value="Search" size="25" />
<input type="text" name="dir_search_content" value="Search Content" size="18" />
<!--input type="submit" name="dir_showall" value=" Show All ->" size="12" /-->
</div>
<div align="center">
<input type="hidden" name="posted" value="true");
<input type="submit" name="dir_save" value="Save">&nbsp;
<input type="submit" name="dir_edit" value="Edit" /> &nbsp;
<input type="submit" name="dir_delete" value="Delete" />&nbsp;
<input type="submit" name="dir_cancel" value="Cancel">&nbsp;
<input type="reset" name="dir_reset" value="Reset">
</div>
<table align="center" border="">
<tr>
<td>
<b>Name :</b><input type="text" name="dir_name" value="<?php echo $column1; ?>"size="38">
</td>
</tr>
<tr>
<td>
<b>Title :</b>&nbsp;&nbsp;<input type="text" name="dir_title" value="<?php echo $column2; ?>" size="25">&nbsp;
<b>Company :</b><input type="text" name="dir_company" value="<?php echo $column3; ?>" size="25">
</td>
</tr>
<tr>
<td><b>Email</b><br />
<input type="text" name="dir_email" value="<?php echo $column4; ?>" size="36" />
&nbsp;&nbsp;&nbsp;

</td>
</tr>
<tr>
<td><b>Phone</b><br />
<input type="text" name="dir_phone" value="<?php echo $column5; ?>" size="36" />
&nbsp;&nbsp;&nbsp;

</td>
</tr>
<tr>
<td><b>Address</b><br />
<textarea name="dir_address" rows="3" cols="33"><?php echo $column6; ?></textarea>
&nbsp;&nbsp;&nbsp;

</td>
</tr>
<tr>
<td><b>Website</b><br />
<input type="text" name="dir_website" value="<?php echo $column7; ?>" size="36" />
&nbsp;&nbsp;&nbsp;

</td>
</tr>


</td>
</tr-->
<tr>
<td><b>Notes</b><br />
<textarea name="dir_notes" rows="3" cols="58"><?php echo $column8; ?></textarea>
</td>
</tr>
</table>
</form>