Jump to content
xisto Community

apple

Members
  • Content Count

    32
  • Joined

  • Last visited

Everything posted by apple

  1. Hey, I created a page album.php, it shows all the images of a user xxx. and its url is like album.php?nick=xxx. Now suppose there are 2 images in this user album, one image id is 111 and second image id is 112.now how i can link to the each image of the album so that it looks like , album.php?nick=xxx&image_id=111. and album.php?nick=xxx&image_id=112.I hope you understand it.
  2. This is a simple code to register and login.. this uses cookies.. i want to use sessions instead.. can someone tell how i can do it ? config.php <? ob_start(); // allows you to use cookies $conn = mysql_connect("localhost","USER","PASSWORD"); mysql_select_db(DATEBASE) or die(mysql_error()); //fill in the above lines where there are capital letters. $logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'"); $logged = mysql_fetch_array($logged); //the above lines get the user's information from the database.?> login.php <?oB_start();// allows you to use cookies.include("config.php");if (!$logged[username]){if (!$_POST[login]){echo("<center><form method=\"POST\"><table><tr><td align=\"right\">Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"></td></tr><tr><td align=\"right\">Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\"></td></tr><tr><td align=\"center\"><input type=\"submit\" name=\"login\" value=\"Login\"></td></tr><tr><td align=\"center\"><a href=\"register.php\">Register Here</a></td></tr></table></form></center>"); }if ($_POST[login]) {// the form has been submitted. We continue...$username=$_POST['username'];$password = md5($_POST[password]);// the above lines set variables with the submitted information. $info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());$data = mysql_fetch_array($info);if($data[password] != $password) {// the password was not the user's password!echo "Incorrect username or password!";}else{// the password was right!$query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());$user = mysql_fetch_array($query);// gets the user's informationsetcookie("id", $user[id],time()+(60*60*24*5), "/", "");setcookie("pass", $user[password],time()+(60*60*24*5), "/", "");// the above lines set 2 cookies. 1 with the user's id and another with his/her password. echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://forums.xisto.com/no_longer_exists/ You! You will be redirected");// modify the above line...add in your site url instead of yoursite.com}}}else{// we now display the user controls.echo ("<center>Welcome <b>$logged[username]</b><br /></center>- <a href=\"editprofile.php\">Edit Profile</a><br />- <a href=\"members.php\">Member List</a><br />- <a href=\"logout.php\">Logout</a><br />");}?>
  3. How does Google News works ?? Do they take use rss feeds of the news websites and then sort ? in that case do they always print the news only from the website whose rss feeds they have added in their system? or there's something else ? Can someone please give an idea about their alogorithm ??
  4. I have made forums, and i request people to register at my forum and help me growing them. my forums are about programming stuff, its very simple looking forum. kindly have a look http://forums.xisto.com/no_longer_exists/ Thanks.
  5. There'r many websites like Xisto which offer free hosting but require you to post on forums.. just curious, what is logic behind this ? they get money from ads what they have put on forums... but, is it good enough that they are in this business ??? dont tell me that they are paying by their pockets
  6. I want to display the contents of a directory.. i have the following code.. It gives the output in one column only... like file1 file2 file3 file4 . . . . . Since there are lot of files so this column gets very long..i want to display the x number of files in each column.. like if there are 22 files.. then file 1 file 11 file 21 file 2 . file 22 file 3 .. . . . file 10 file 20 This was just an example..I know it can be done by using <td> but i dont know how to do it with loop. Please help me.
  7. Hello..Can someone advice me if it is a wise idea to start promoting a website with the Popunder advertising ? I know it is annoying to people but i think this is the only cheap option which i have and which i can afford.Clicksor offers 0.003$ per visitor.Can someone tell me any company which is cheaper than this ? Looking forward for your reply.Regards
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.