[go: up one dir, main page]

Menu

[r9]: / emma / bin / addemotion.php  Maximize  Restore  History

Download this file

61 lines (39 with data), 1.3 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
$fname = $_REQUEST['wubi'];
$fdesc = $_REQUEST['desc'];
$tags = $_REQUEST['tags'];
$parent = $_REQUEST['parent'];
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$kindofnode = $_REQUEST['kindofnode'];
$nodeid = $_REQUEST['nodeid'];
$emotion = $_REQUEST['emotion'];
/*
$fname = mysql_real_escape_string($_REQUEST['wubi']);
$fdesc = mysql_real_escape_string( $_REQUEST['desc']);
$tags = mysql_real_escape_string($_REQUEST['tags']);
$parent = mysql_real_escape_string($_REQUEST['parent']);
*/
mysql_connect(localhost,"root", "kz9rumvxxe") or die ("oops");
@mysql_select_db("spaceout") or die ("UTOCONN");
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
echo ": $fname : $fdesc :";
echo"cheese=good";
$q = "SELECT * FROM emotions WHERE nodeid='$nodeid' and emotiontype='$emotion'";
$r = msyql_query($q);
$n = mysql_numrows($r);
if($n < 1) {
$q = "INSERT INTO emotions VALUES('','$nodeid','$emotion','1')";
$r = mysql_query($q);
}
else
{
$emotionvalue = mysql_result($r, 0, "value");
$emotionvalue = $emotionvalue + 1;
;
$q = "UPDATE emotions SET value='$emotionvalue' WHERE nodeid='$id'";
$r = mysql_query($q);
}
mysql_close();
?>