function return_result($success, $errors, $data)
{
    echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    echo '<results><success>' . $success . '</success>';
    echo_errors($errors);
    echo $data;
    echo '</results>';
}
Beispiel #2
0
function return_result($success,$errors,$data) {
	echo("<?xml version=\"1.0\" encoding=\"utf-8\"?>");	
	?>
	<results>
	<success><?=$success;?></success>
	<?=$data;?>
	<?=echo_errors($errors);?>
	</results>
	<?
}
	</tr>


</table>
<input type="submit" title="לחץ להרשמה" value="הירשם"></form>

<?php 
}
Validate_Request();
if (isset($persistent)) {
    if (empty($errors)) {
        /*INSERT NEW USER INTO USERS TABLE*/
        $sql = "INSERT INTO users(UserName,FirstName,LastName,ID,City,Street,HouseNumber,CellPhone,Phone,Email,Password,Approved,YearOfBirth,MonthOfBirth,DayOfBirth,FatherName,FatherPhone,MotherName,MotherPhone)";
        $sql .= " values('" . $persistent["user_name"] . "','" . $persistent["first_name"] . "','" . $persistent["last_name"] . "','" . $persistent["ID"] . "','" . $persistent["city"] . "','" . $persistent["street"] . "','" . $persistent["house_number"] . "','" . $persistent["cell_phone"] . "','" . $persistent["phone"] . "','" . $persistent["email"] . "','" . md5($persistent["pass1"]) . "'," . "'0'" . ",'" . $persistent["year_of_birth"] . "','" . $persistent["month_of_birth"] . "','" . $persistent["day_of_birth"] . "','" . $persistent["father_name"] . "','" . $persistent["father_phone"] . "','" . $persistent["mother_name"] . "','" . $persistent["mother_phone"] . "')";
        //printSqlQuary($sql);
        $result = executeQuary($sql);
        /*INSERT NEW USER INTO USERS-GROUPS TABLE*/
        $sql = "INSERT INTO users_activitygroups(UserName,SiD)";
        $sql .= " values('" . $persistent["user_name"] . "','" . $persistent["memberOfGroup"] . "')";
        $result = executeQuary($sql);
        echo "<center><b><hr>***  רישום הסתיים בהצלחה   ***<hr> <a href=" . $index_page . ">חזרה לעמוד הבית</a></b></center>";
    } else {
        draw_page($persistent);
        echo_errors();
    }
} else {
    draw_page($persistent);
}
?>
 
</body>