Page Title: AIM Profile Viewer |
View or add comments: |
1. Create a Table with ID and Screenname fields
2. Create this file using your details
2. Create this file using your details
Code :
// hide source code
// hide line numbers
// hide source code
// hide line numbers
1 <?
2
3 $conn = mysql_connect("localhost","USERNAME","PASSWORD");
4
5 //the db we used in phpmyadmin
6 $db = mysql_select_db("db");
7
8 //find out if the screenname is already in the database
9 $result = MYSQL_QUERY("SELECT * from aim WHERE screenname='$sentname'");
10 $sql = mysql_fetch_array($result);
11 $username = $sql["screenname"];
12
13
14 //if he isn't, add him
15 if(!$username)
16 {
17 $result=MYSQL_QUERY("INSERT INTO aim (id,screenname)"."VALUES ('NULL', '$sentname')");
18 }
19
20 //display the whole database
21 $result = MYSQL_QUERY("SELECT * from aim");
22 while($r=mysql_fetch_array($result))
23 {
24 $screenname=$r["screenname"];
25 if(strlen($screenname) < 30)
26 echo "$screenname <br />";
27 }
28 ?>
Donation:If you like our free quality work, make a donation by using Paypal and tell us what you would like to see improved on our site for the next few months. |
|
No comments yet













Page Info












