Thursday, January 2, 2014

how to create database and their tables

Hello friends

create database  name is myproject and table is thefiles (without spases )


the format would be


Database myproject

Table structure for table thefiles

Field
Type
Null
Default
id
int(255)
No
Time
int(11)
No
FileLocation
text
No
IP
varchar(15)
No
Title
text
No

Dumping data for table thefiles

1
1388658360
nullish
127.0.0.1
hello
2
1388661214
uploads/Resume-Aditya-1.docx
127.0.0.1
ads
3
1388661222
nullish
127.0.0.1
hello
4
1388661486
uploads/real estate.jpg
127.0.0.1
image
5
1388662296
uploads/Resume-Aditya.doc
127.0.0.1
ankit

Table structure for table thefiles

Field
Type
Null
Default
id
int(255)
No
Time
int(11)
No
FileLocation
text
No
IP
varchar(15)
No
Title
text
No


How to upload a file in doc file in php only two steps

Step:-2


<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("myproject") or die(mysql_error());


if(! is_dir("uploads"))
{
mkdir("uploads");
}

function savedata()
{
global $_FILES, $_POST, $putItAt;

$sql="INSERT INTO `thefiles` (`id` ,`Time` ,`FileLocation` ,`IP` ,`Title` )
VALUES (NULL
, UNIX_TIMESTAMP( ) , '".mysql_real_escape_string($putItAt)."', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string(         $_POST['title'])."'
);";

mysql_query($sql);
}

$putItAt="uploads/".basename($_FILES['uploadfile']['name']);

$putItAt=str_replace("php","txt",$putItAt);



if(move_uploaded_file($_FILES['uploadfile']['tmp_name'],$putItAt))

{
savedata();
header("location:upload-php.php");

}

else
 {
 if(copy($_FILES['uploadfile']['tmp_name'].$putItAt))
 {  
     savedata();
 header("location:upload-php.php");
 }
 else{
 echo'you totally faild';
 }
 }
?>

How to create,uploads,and modify my files in php



HTML Script To upload a file in html format


Step:-1 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>upload</title>
</head>

<body>
<form enctype="multipart/form-data" action="upload.php" method="post">
<label> choose file to upload!</label>
<input name="uploadfile" type="file"/>
<br />
<br />

And what you like to call <input name="title" type="text"/>
<br />
<input type="submit" value="upload file" />
</form>
</body>
</html>

Tuesday, December 3, 2013

Top 500 PR 2+ Dofollow Social Bookmarking Sites 2014


Serial No.
Bookmarking Sites
PageRank

1

8
2
8
3
8
4
8
5
8
6
8
7
8
8
8
9
8
10
8


11




7
12
7
13
7
14
7
15
7
16
7
17
7
18
7
19
7


20




6
21
6
22
6
23
6
24
6
25
6
26
6
27
6
28
6
29
6
30
6
31
6
32
6
33
6
34
6
35
6


36




5
37
5
38
5
39
5
40
5
41
5
42
5
43
5
44
5
45
5
46
5
47
5
48
5
49
5
50
5
51
5
52
5
53
5
54
5
55
5
56
5


57




4
58
4
59
4
60
4
61
4
62
4
63
4
64
4
65
4
66
4
67
4
68
4
69
4
70
4
71
4
72
4
73
4
74
4
75
4
76
4
77
4
78
4
79
4
80
4
81
4


82




3
83
3
84
3
85
3
86
3
87
3
88
3
89
3
30
3
91
3
92
3
93
3
94
3
95
3
96
3
97
3
98
3
99
3
100
3
101
3
102
3
103
3
104
3
105
3
106
3
107
3
108
3
109
3
110
3
111
3
112
3
113
3
114
3
115
3
116
3
117
3
118
3
119
3
120
3