-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess_top10.php
More file actions
executable file
·45 lines (35 loc) · 1.06 KB
/
process_top10.php
File metadata and controls
executable file
·45 lines (35 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
include "connect.php";
$con_data = mysql_query ("SELECT * FROM `user_connections` WHERE `user_id` = $userid LIMIT 0 , 30 ");
$rows = mysql_num_rows ($con_data);
while ($con_array = mysql_fetch_array($con_data)) {
$cnm = $con_array["connection_name"];
$cnp = $con_array["connection_phone"];
}
$index = 1;
while ($index <= 10) {
$string_name = "full_name".$index;
$string_phone = "phone_number".$index;
$con_name = $_POST[$string_name];
$con_phone = $_POST[$string_phone];
$exists = mysql_query("SELECT *
FROM `user_connections`
WHERE `user_id` = '$userid'
AND `connection_phone` = '$con_phone'
LIMIT 0 , 30");
if ((mysql_num_rows($exists) == 0) && ($con_name != null) && ($con_phone != null)) {
mysql_query ("INSERT INTO `dumaremote`.`user_connections` (
`user_id` ,
`connection_name` ,
`connection_phone` ,
`connection_id`
)
VALUES (
'$userid', '$con_name', '$con_phone', NULL
);");
}
$index++;
}
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=welcome.php">';
exit;
?>