Member Avatar

hello every one i am creating form of 15 question length for 5 questions it worked but when i increase the length of question to 15 or 18 dont work plz help me it's urgent

    //Start session

    //Include database connection details

    //Array to store validation errors
    //$errmsg_arr = array();

    //Validation error flag
    //$errflag = false;

    //Connect to mysql server
    $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
    if(!$link) {
        echo"Not Connected";
        die('Failed to connect to server: ' . mysql_error());

    //Select database
    $db = mysql_select_db(DB_DATABASE);
    if(!$db) {
        echo "Not Selected";
        die("Unable to select database");

    //Function to sanitize values received from the form. Prevents SQL injection
    function clean($str) {
        $str = @trim($str);
        if(get_magic_quotes_gpc()) {
            $str = stripslashes($str);
        return mysql_real_escape_string($str);

    //Sanitize the POST values
    //$ans = clean($_POST['25rboption13']);

    //If there are input validations, redirect back to the same form
    /*if($errflag) {
        $_SESSION['ERRMSG_ARR'] = $errmsg_arr;
        header("location: .php");

    //Check whether the query was successful or not


    //  foreach($_POST as $ans){
        //Create query
        $qry="INSERT INTO diseases (q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13) values(' ".$_POST['25rboption13']." ',' ".$_POST['129rboption13']." ',' ".$_POST['150rboption13']." ',' ".$_POST['151rboption13']." ',' ".$_POST['152rboption13']." ',' ".$_POST['153rboption13']." ',' ".$_POST['154rboption13']." ',' ".$_POST['592rboption13']." ',' ".$_POST['593rboption13']." '' ".$_POST['594rboption13']." ',' ".$_POST['595rboption13']." ',' ".$_POST['596rboption13']." ',' ".$_POST['1169rboption13']." ')";
        echo "data inserted";

        }else {
        die("Query failed");

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Form Processing</title>


this my php code to process the form problem is here i cant make all radio buttons fall under same name???