Jump to content
xisto Community

Eggie

Members
  • Content Count

    244
  • Joined

  • Last visited

Everything posted by Eggie

  1. What kind of printouts ?and where should these printouts be?If anyone is interested in helping,please contact me on my email or PM me,you will get an reward for doing this ...thanks,Eggie
  2. session_start(); require 'dconn.php';$connection = mysql_connect($db_server, $db_user,$db_pass) or die(mysql_error()); mysql_select_db($db_name, $connection) or die(mysql_error()); $uname = $_POST['uname']; $password = $_POST['password']; //set up the query $query = "SELECT * FROM $user_table WHERE username='$uname' AND password='$password'"; //run the query and get the number of affected rows $result = mysql_query($query, $connection) or die('error making query'); $affected_rows = mysql_num_rows($result); //if there's exactly one result, the user is validated. Otherwise, he's invalid if($affected_rows == 1) { $_SESSION['letmein'] = true; $result = mysql_query("SELECT userid, verified, username AS uuname FROM $user_table where username='$uname'",$connection); if ($myrow = mysql_fetch_array($result)) { $_SESSION["id"]=$myrow['userid']; if ($myrow["verified"] == 'n') { die("You have not yet verified your account."); } $_SESSION["username"]=$myrow['uuname']; header("Location: start.php?option=main"); exit(); } else { echo "Sorry, no records were found!"; } } else { echo mysql_error(); header ("Location: index.php?invalid=invalid+username/password"); }?> so you think only this will settle everything?? thanks...Eggie
  3. Maybe this can help,or is there something wrong with this?? require.inc.php global $username;require 'dconn.php';session_start();$username = @$_SESSION["username"];$connection = mysql_connect($db_server, $db_user, $db_pass) or die(mysql_error());mysql_select_db($db_name, $connection) or die(mysql_error());.....variables.....function footer() { ?> <CENTER> <table><tr> <td class="font" align=center><a href="start.php?option=contact">-contact us-</a> <a href="privacy.htm" target="_NEW">-privacy policy-</a> <a href="spam.htm" target="_NEW">-spam policy-</a><br></td></tr> </table> </CENTER> <?}?>
  4. Can someone look this script over?? ever time i put something in any of inputs,it sends me back to /index.php?invalid=invalid+username/password which can be found in validate.php HERE is link to the site so you can try entering anything I created user manually username:Administrator password:Xisto so you can try logging in too this is index.php require 'require.inc.php'; // Unset all of the session variables. @session_unset(); // Finally, destroy the session. @session_destroy(); /* if ($_GET('signup')) { error("SIGNUP"); echo "Error Checking<br>"; while(list($name, $value) = each($signup)) { [tab][/tab] echo "$name - $value<br>"; } } */ [tab][/tab]if (@$signup) { [tab][/tab]if (@$signup[repassword] != @$signup[password]) { [tab][/tab][tab][/tab]$err_msg = "Your passwords do not match."; error($err_msg); [tab][/tab]} [tab][/tab]if(!eregi("^[_\.0-9a-z-]+$",@$signup[username])) { [tab][/tab][tab][/tab]$err_msg = "Invalid Username! Usernames can consist of letters and numbers only."; error($err_msg); [tab][/tab] } [tab][/tab]if(!eregi("^[_\.0-9a-z-]+$",@$signup[password])) { [tab][/tab] $err_msg = "Invalid Password! Passwords can consist of letters and numbers only."; [tab][/tab]} [tab][/tab] if(!@$signup[password] || !@$signup[username] || !@$signup[email] || !@$signup[username]) { [tab][/tab][tab][/tab][tab][/tab]$err_msg = "Oops! You forgot some important fields!"; } [tab][/tab] if (mysql_num_rows(mysql_query("Select username from $user_table where username = '$signup[username]'")) > 0) { [tab][/tab][tab][/tab] $err_msg = "Oops! Someone already has that username."; [tab][/tab] } [tab][/tab] if (!@$err_msg) { srand((double)microtime()*1000000); $acode = rand(100000, 199999); [tab][/tab]$usercheck = @mysql_query("INSERT INTO $user_table (username, realname, email, password, verified, activationcode, type, points, joindate) values('$signup[username]','$signup[rname]', [tab][/tab][tab][/tab] '$signup[email]','$signup[password]', 'n', $acode, 'free', $signPoints, ".time().")"); [tab][/tab][tab][/tab] [tab][/tab][tab][/tab][tab][/tab]// done, you are entered correctly, Now Enter the points and URL info [tab][/tab][tab][/tab][tab][/tab] [tab][/tab] [tab][/tab] [tab][/tab][tab][/tab]$sql = "Select userid from $user_table where username='$signup[username]'"; [tab][/tab][tab][/tab]$result = mysql_query( $sql ); [tab][/tab][tab][/tab][tab][/tab]if ( $result != false ) [tab][/tab][tab][/tab][tab][/tab][tab][/tab]{ [tab][/tab][tab][/tab][tab][/tab]while ( $data = mysql_fetch_assoc( $result ) ) [tab][/tab][tab][/tab][tab][/tab]{ [tab][/tab][tab][/tab][tab][/tab][tab][/tab]$point_set = $data['id']; [tab][/tab][tab][/tab] [tab][/tab][tab][/tab][tab][/tab][tab][/tab]} [tab][/tab][tab][/tab][tab][/tab]} else { [tab][/tab][tab][/tab][tab][/tab][tab][/tab]echo mysql_error(); [tab][/tab][tab][/tab][tab][/tab]}[tab][/tab] [tab][/tab] [tab][/tab][tab][/tab] [tab][/tab][tab][/tab][tab][/tab] [tab][/tab]if (!@$usercheck) { [tab][/tab][tab][/tab][tab][/tab] $err_msg = "Database error:<br>There was an error entering your account.<br>It is possible that username already exists, please try another one.<br>"; [tab][/tab][tab][/tab][tab][/tab] } else { [tab][/tab][tab][/tab][tab][/tab] [tab][/tab]include ("reg.php"); [tab][/tab][tab][/tab][tab][/tab] [tab][/tab]exit; [tab][/tab][tab][/tab][tab][/tab] [tab][/tab]} [tab][/tab][tab][/tab] } [tab][/tab][tab][/tab] if (!@$err_msg) { [tab][/tab][tab][/tab][tab][/tab]// done, you are entered correctly [tab][/tab][tab][/tab] } } else { } ?> <html> <head><title> <? echo $title; ?> - Surf Exchange Engine </title> <META NAME="keywords" CONTENT="free surf manual surf exchange money get paid traffic visitors hits"> <META NAME="description" CONTENT="Generate crazy hits to your website by visiting others, and earning money!"> </head> <META content="text/html; charset=windows-1252" http-equiv=Content-Type> <BODY aLink="#333333" bgColor="white" link="#333333" text="#000000" vLink="#333333"> <basefont face='tahoma'><table width=100% background='images/1.jpg' cellpadding="0" cellspacing="0" style="background-repeat: no-repeat"> <tr valign="middle"> [tab][/tab]<td colspan="2" valign='middle'> <br> [tab][/tab] <blockquote> <b><font face="Verdana, Arial, Helvetica, sans-serif" color="#000099" size=6> [tab][/tab][tab][/tab]<? echo $title; ?></font></b> </blockquote> [tab][/tab]</td> </tr> <tr> [tab][/tab]<td width=60% bgcolor="#FFFFFF" align="center"><small>(<a href='reset.php'>I've lost my password</a>)</small></td> [tab][/tab]<td width="40%" align="right" class="nowrapbg" background="images/logback.jpg" style="background-repeat: no-repeat"><small> [tab][/tab] <form action='validate.php' method=post> [tab][/tab][tab][/tab]<font size="2">Username: [tab][/tab][tab][/tab]<input name="uname" type="text" size="6"> [tab][/tab]Password: [tab][/tab]<input name="password" type="password" size="7"> [tab][/tab]<input type="image" border="0" name="imageField" src="images/arrow.gif" width="17" height="17"> [tab][/tab]</font> [tab][/tab] </form> [tab][/tab] </small></td> </tr> </table><font color=red><? echo @$invalid; echo "<br>"; ?></font> <? echo $mainText; ?> <? if (@$err_msg) echo "<br><font color=red size=2>$err_msg</font><br>"; ?> [tab][/tab][tab][/tab][tab][/tab][tab][/tab] <form name="form" action="<? echo $PHP_SELF; ?>" method="POST"> <input type="hidden" name="signup" value="true">[tab][/tab][tab][/tab][tab][/tab][tab][/tab] <table width=100% cellpadding="2" cellspacing="0" align=center> [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] [tab][/tab]<tr> [tab][/tab] <td colspan=2 bgcolor="#CCCCFF"><b>Please Enter Your [tab][/tab][tab][/tab]Information:</b></td> [tab][/tab]<tr><td>Real Name:</td><td><input type="text" name="signup[rname]" maxlength="36" size="25" value="<? echo @$signup[rname]; ?>"></td></tr><tr><td> E-mail:</td><td><input type="text" name="signup[email]" maxlength="255" size="25" value="<? echo @$signup[email]; ?>"></td></tr> [tab][/tab]<tr> [tab][/tab] <td colspan = 2 bgcolor="#CCCCFF"> <b>Please supply [tab][/tab][tab][/tab]a Username and Password</b></td> [tab][/tab]</tr><tr><td> Username:</td><td> <input type="text" name="signup[username]" maxlength="10" size=25 value="<? echo @$signup[username]; ?>"></td></tr><tr><td> Password:</td><td> <input type="password" name="signup[password]" maxlength=10 size="25"></td></tr><tr> <td> Re-Enter Password:</td><td> <input type="password" name="signup[repassword]" size=25></td></tr> [tab][/tab]<tr align="center"> [tab][/tab] <td colspan=2>Press the button below ONCE to continue the process it will [tab][/tab][tab][/tab]take a few seconds, please be patient! </td> [tab][/tab]</tr> [tab][/tab]<tr align="center"> [tab][/tab] <td colspan=2> [tab][/tab][tab][/tab]<input name="submit2" type="submit" value="Signup"> [tab][/tab] </td> [tab][/tab]</tr></table></form> <tr><td width="800" align="center"> <CENTER> <table> <tr> <td class="font" align=center><a href="contact.php" target=_blank>-contact us-</a> <a href="privacy.htm" target="_blank">-privacy policy-</a> <a href="spam.htm" target="_blank">-spam policy-</a><br> [tab][/tab][tab][/tab][tab][/tab]This has been a Sabu production</td> [tab][/tab][tab][/tab]</tr> </table> </CENTER></td></tr> </body></html> this is validate.php session_start(); [tab][/tab][tab][/tab]require 'dconn.php'; $connection = mysql_connect($db_server, $db_user,$db_pass) or die(mysql_error()); [tab][/tab]mysql_select_db($db_name, $connection) or die(mysql_error()); [tab][/tab]$uname = $_POST['uname']; [tab][/tab]$password = $_POST['password']; [tab][/tab]//set up the query [tab][/tab]$query = "SELECT * FROM $user_table WHERE username='$uname' AND password='$password'"; [tab][/tab][tab][/tab][tab][/tab] [tab][/tab]//run the query and get the number of affected rows [tab][/tab]$result = mysql_query($query, $connection) or die('error making query'); [tab][/tab]$affected_rows = mysql_num_rows($result); [tab][/tab]//if there's exactly one result, the user is validated. Otherwise, he's invalid [tab][/tab]if($affected_rows == 1) { [tab][/tab] [tab][/tab][tab][/tab][tab][/tab][tab][/tab]$_SESSION['letmein'] = true; [tab][/tab][tab][/tab][tab][/tab][tab][/tab]$result = mysql_query("SELECT userid, verified, username AS uuname FROM $user_table where username='$uname'",$connection); [tab][/tab][tab][/tab][tab][/tab][tab][/tab]if ($myrow = mysql_fetch_array($result)) { [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab]$_SESSION["id"]=$myrow['userid']; [tab][/tab][tab][/tab][tab][/tab][tab][/tab] if ($myrow["verified"] == 'n') { [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab] die("You have not yet verified your account."); [tab][/tab][tab][/tab][tab][/tab][tab][/tab] } [tab][/tab][tab][/tab][tab][/tab][tab][/tab] [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab]$_SESSION["username"]=$myrow['uuname']; [tab][/tab][tab][/tab][tab][/tab] header("Location: start.php?option=main"); [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab]} else { [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab]echo "Sorry, no records were found!";[tab][/tab] [tab][/tab][tab][/tab][tab][/tab][tab][/tab][tab][/tab]} [tab][/tab][tab][/tab] [tab][/tab][tab][/tab] [tab][/tab][tab][/tab]} else { [tab][/tab][tab][/tab]echo mysql_error(); [tab][/tab][tab][/tab]header ("Location: index.php?invalid=invalid+username/password"); [tab][/tab]} ?>
  5. Hi mastercomputers,i can see some things have been changed on php...this doesn't sound good ;)so,i can't just make "autoglobals" on??i have many errors since last time i used my site(which is no longer hosted,i am using wamp to finish it)i will need to make many changes on my site because of this,and i won't if i can do something else ;)Thanks...Eggie
  6. yeah,sorry i misread...it is nice that people here are willing to help,afterall they are getting MyCents for it,so who wouldn't,i think that there are many people who don't know that this kind of getting "money" is around...why don't we get more people here Thanks...Eggie
  7. He only has 1 post and he already got 23 replies....wow... i think that you should start creating your game,and learn in the mean time... i did first web page only with <phpprint 'Welcome';?> and than i downloaded some game scripts which i rewrote... after that game was running fine until i had no time running it... i stopped,and now i have nothing except my scripts....my sql database is gone... i contacted my host,but they don't have backups back to 2007/08 when i hosted there...now i am looking at scripts and trying to rewrite my database... you should always backup scripts AND databases Thanks...Eggie
  8. I am "rewriting" my old game scripts and i am having problems with it ... right now i am having problems recovering my login form script this is in my head.php <tr><form method=post action=login.php> <td align="center"><b>Name</b></td> </tr> <tr> <td align="center"><input type=text name=user size="12"></td> </tr> <tr> <td align="center"><b>Password</b></td> </tr> <tr> <td align="center"><input type=password name=pass size="12"></td> </tr> <tr> <td align="center"> <p align="center"><input type=submit value=Login></form></p> this is in my login.php <?php $title = "Login"; if (!$user || !$pass) { include("head.php"); print "Please fill out all fields."; include("foot.php"); exit;} it says "Notice: Undefined variable: user in C:\wamp\www\login.php on line 2" when i try to login ... what is the problem??it worked before.
  9. ohhh...nice,i saw this site once,but it did not interest me at that time,and in the mean time,i forgot about it...thank you for remembering me of this site(program).i will do that and try sorting it out ...this will really help me ;)did any of you ever done that or see other people do it on their PC's?which application should i use to do it?should i use windows default application to do it?and how can i say to my PC which is at home while i am at my girlfriends house not to remote connect to any other connection but mine???'password?
  10. utorrent really is easy to use torrent client...everyone should try using it.you can get used to it very fast....if you want to optimize it,you should use tutorial which is i think on their site...Thanks...Eggie
  11. we both have dynamic ip's...i think there is a way to always send my ip to a site which i can read it from at my girlfriends place...so thats how i can do it i think ;)can you please suggest something which can help me in doing this ??Thanks...Eggie
  12. i use both vuze and utorrent...i changed in order to see how well vuze does...but i think utorrent is still best...slim fast,many options ;)Thanks...Eggie
  13. Filezilla and smartftp...try them,you can't miss ;)Thanks...Eggie
  14. I am trying to do it myself...i downloaded some mysql program(of which i don't know name cause i'm at work) , and creating one table at the time and one collumn at the time ;)I'll also try learning with phpbb forums ;)Thanks...Eggie
  15. nice...thanks for the ideas,but i think i will use remote connection and do it like that,that seems best way...500$ are too much for that if you ask me so i won't do it like that,but it is good to know that there is some other way ;)Thanks...Eggie
  16. Is it possible to connect to my internet which is at my home while i'm at my girlfriends place to somehow spend my own home bandwidth instead of spending hers?she has internet connection with which she has to pay per every 5GB's while i have flat internet connectionThanks...Eggie
  17. I'm surely going to try it cause i became a betting junkie last month....;)Thanks...Eggie
  18. it is best to use .tk site as redirection...
  19. IS it possible?? is there any program that does such a thing??create tables automatically when i tell him which script to do it on??and how much would a guy ask from me to do it instead of me??Thanks...Eggie
  20. images too?really smart program ;)can it take tables too?Thanks...Eggie
  21. Thanks for your answers...I just didn't know if there really exists one program that does such a thing...i really like that you don't have to retype everything,but just some mistakes that program makes which rarely happens...I will download trial of Abby Finereader and try it at first,but i think i'll like it that much to buy it afterall ;)Thanks...Eggie
  22. ocr works well enough...it's better than just rewrite it by hand....thank you very much...Thanks...Eggie
  23. Is it possible to convert scanned picture(jpg) which has text into plain .txt file?my girlfriend got a mail from her professor which he scanned,not typed,and she wants it in .txt format....can this be easily done with some converter or she must retype it ?Need this information asap ;)Thanks...Eggie
  24. Some people might want it,people that are not wanted in our society or very fat people...It would not be the same marrying robot and real girl...Some of us think of marriage as an quest,or problem you have to deal with...If you change that,getting married loses sense,and people don't want that,They want a challenge...Thanks...Eggie
×
×
  • 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.