Q:

Multiple form sign up not working

I have a sign up process which involves two forms being submitted. The problem is with the first form not being submitted. Also, I need a way to relate the two forms as information from both is inserted into the same table row, I think this can be done by taking the previous table row id. 
It is supposed to work like this: First a user must search for an item in the search bar. Matches are then displayed with radio buttons next to each one and a submit button at the bottom. When submitted, the form data (which is the result of the search that they checked with the radio) goes into the database table 'users'. The 'users' table contains a row for id, username, password and radio. 
The radio option is submitted into radio. This also creates an id, which is auto incremented. That is the first form. Once the radio option is picked and the data is in a table row, the user must fill out the second form which asks for an email and a password, which is submitted into the same row that the radio option is in. 
When I go through this process, the email (referred to as username in table) and password appear in the table along with the id, but the radio is always blank. Not sure why the radio option is not being submitted. Also not sure if i need a way to relate the forms. I am a beginner at this so, please try to make answers understandable. Thanks in advance, heres the code:
<?php
       //This code runs if the form has been submitted

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

 //This makes sure they did not leave any fields blank

 if (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) {

        die('You did not complete all of the required fields');

    }

 // checks if the username is in use

    if (!get_magic_quotes_gpc()) {

        $_POST['username'] = addslashes($_POST['username']);

    }

 $usercheck = $_POST['username'];

 $check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'") 

or die(mysql_error());

 $check2 = mysql_num_rows($check);

 //if the name exists it gives an error

 if ($check2 != 0) {

        die('The email '.$_POST['username'].' is already in use.');

                }

 // this makes sure both passwords entered match

    if ($_POST['pass'] != $_POST['pass2']) {

        die('Your passwords did not match. ');

    }

    // here we encrypt the password and add slashes if needed

    $_POST['pass'] = md5($_POST['pass']);

    if (!get_magic_quotes_gpc()) {

        $_POST['pass'] = addslashes($_POST['pass']);

        $_POST['username'] = addslashes($_POST['username']);

            }

 // now we insert it into the database
    $insert = "INSERT INTO users (username, password, radio)
            VALUES ('".$_POST['username']."', '".$_POST['pass']."', '".$_POST['radio']."')";
    $add_member = mysql_query($insert);
?>

 <h2><font color="red">Registered</font></h2>
 <p>Thank you, you have registered - you may now login</a>.</p>
<?php 
} 
else 
{   
?>
<font color = #000000><h1>Sign Up</h1></font>
<?php
// Search Engine
// Only execute when button is pressed
if (isset($_POST['keyword'])) {
// Filter
$keyword = trim ($_POST['keyword']);

// Select statement
$search = "SELECT * FROM tbl_name WHERE cause_name LIKE '%$keyword%'";
// Display
$result = mysql_query($search) or die('That query returned no results');
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<?php
while($result_arr = mysql_fetch_array( $result )) 
{ 
?>
// Radio button
<input type="radio" name="radio">
<?php
echo $result_arr['cause_name']; 
echo " "; 
echo "<br>";
}
?>
<input type="submit" name="radio_submit" value="Select Item">
</form>
<?php
$anymatches=mysql_num_rows($result); 
if ($anymatches == 0) 
{ 
   echo "We don't seem to have that cause. You may add a cause by filling out a short <a href='add.php'>form</a>.<br><br>"; 
}
}
?>
<!--Sign Up Form-->
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="sign_up_form">
<input type="text" name="keyword" placeholder="Search" onFocus="this.select();" onMouseUp="return false;">
<input type="submit" name="search" value="Search">
<br />
<br />
<input type="email" name="username" maxlength="250" placeholder="Your email" onFocus="this.select();" onMouseUp="return false;">
<input type="password" name="pass" maxlength="50" placeholder="Password" onFocus="this.select();" onMouseUp="return false;">
<input type="password" name="pass2" maxlength="50" placeholder="Re-type Password" onFocus="this.select();" onMouseUp="return false;">
<br />
<input type="submit" name="submit" value="Sign Up">
</form>
<?php
}
?>

A:

Modify your code like this
<input type="radio" name="radio" value="<?php echo $result_arr['cause_name']; ?>" >

and then submit it you should get the value
update the below query as well
<?php
echo $insert = "INSERT INTO users (username, password, radio) VALUES ('$_POST[username]', '$_POST[pass]', '$_REQUEST[radio]')";
    $add_member = mysql_query($insert);
?>

change the below code
 //This code runs if the form has been submitted

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

/////
<?php 
    if (isset($_REQUEST['submit']))
    {
        $radio = $_REQUEST['radio'];
        $insert = mysql_query("INSERT INTO users (radio) VALUE ('$radio')");

        if (!$insert)
        {
            echo mysql_error();
        }
    }

?> 

<form action="" method="get"> 
<input type="radio" name="radio" value="red">red 
<input type="radio" name="radio" value="blue">blue 
<input type="submit" name="submit" /> 
</form>

