# Register script help

**URL:** <https://forum.kirupa.com/t/register-script-help/53514>\
**Category:** Uncategorized\
**Created:** [June 4, 2004, 3:58pm UTC](https://forum.kirupa.com/t/register-script-help/53514 "2004-06-04T15:58:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmayo86](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jmayo86](https://forum.kirupa.com/u/jmayo86)\
**Post date:** [June 4, 2004, 3:58pm UTC](https://forum.kirupa.com/t/register-script-help/53514/1 "2004-06-04T15:58:39Z")

</div>

Hello i have wrote this script…

```php
<?php
####################
# Register an user #
####################

# Verify given information :
if($f_name == "" || $l_name == "" || $username == "" || $password == "" || $password2 == "" || $email == "")
{
   die("You didn't give all the informations!";
}

if($password != $password2)
{
   die("The 2 passwords dont match !");
}

# [CONNECT TO YOUR DATABASE]

# Create a date TYPE : 
$date = $year . "-" . $month . "-" . $day;

$query = mysql_query("INSERT INTO auth VALUES('', '$username', '$password', '$f_name', '$l_name', '$email', '$region', '$date', '$Gender')", $connection) or die("CANNOT ADD INFORMATION IN THE DATABASE");

?> 

```

But how do i add in a bit for a male/female radio button, so it submits that 2? Please help! And also do i need my database details underwhere it says connect to database and if so how do i do this in this script aswell?

Thanks  
Jason
