Jump to content
xisto Community

lonebyrd

Members
  • Content Count

    426
  • Joined

  • Last visited

Everything posted by lonebyrd

  1. Yeah for me! I finally got the registration page to work, sort of. When I go to register, I get error messages, These are the three lines: if(mysql_num_rows(mysql_query($nameq)) > 0) {if(mysql_num_rows(mysql_query($emailq)) > 0) {if(mysql_num_rows(mysql_query($nickname))>0) { Is this because in my database I put things as 'ad_name', 'ad_password' etc. Does it have to match exactly as it says in the db. I was just following the tutorial with no real explination. I guess i need to read more on databases and Mysql. They are just confusing.
  2. When I defined the $Char in the functions.php file, what I was trying to accomplish was to let the computer know that it could use any of those letters/numbers for the activation code. I'm not sure about that script exactly, I was following a tutorial, and it didn't really explain that part. But then I needed to change things around is where I got messed up.
  3. So, if I have this clear, my script would look like this: <?php$nickname = "myCpanelname";$password = "myCpanelpassword";$database = "lonebyrd_FTV";$server = "localhost";mysql_connect {$server, $nickname, $password} or die ("Could not connect to server".mysql_error());mysql_select_db{$database} or die ("Database select failed".mysql error());$query = "SELECT name; email; nickname; password; location; gender; date_of_birth; is_activated; activation_code; FROM registration";$result = mysql_query($query);?> If I'm way off again, I might as well just give up. I'm reading the online book Practical PHP Programming, but that is taking some time (which is hard to get all in one shot)
  4. Houdini, in your response to my code, when you use $Db or any $database, am I supposed to type the name of my database or just leave it as it is. I'm just a little confused. I know I'm still learning and I'm sure I'll pick up more as I go along. I've already learned alot (albeit probably not as fast as most people around here).
  5. Oh yeah, I forgot to mention that part. It's an expensive game. It costs $80US but it comes with the game and a guitar controller. The guitar controller has 5 colored buttons on the fret bar that you use to play the game, along with a place to 'stum' up or down, and a whammy bar. Another thing thats cool, in the game you earn star points by hitting certain notes, and if you earn enough of those and tilt the guitar so its pointing up, the screen turns blue and you earn more points. It's pretty neat that it recognizes that you change the guitar position.
  6. I first saw this controller about maybe 4-5 months ago on the G4TV cable channel. People were automatically putting it down. But I was thinking right away, Hey it's a break from the norm. An original concept. It's about time that the company that started the video game craze (in my opinion) come out with something so off the beaten path. When I saw the video that Nintendo was showing at the festival (I can't remember which one it was) it looked cool. People were moving their arms around, swinging imaginary bats, fishing rods, jumping in their chairs... it looked great! I can't wait to try it.
  7. Ok, now I'm confused. What is the difference between hacking and cracking? I've never even heard of cracking before. I'm not trying to call anyone wrong here, but all I have heard of is the negative stuff. What is so positive about hacking?
  8. Anyone play Guitar Hero for the PS2. Man that's an addicting game. I used to dabble with the guitar when I was younger, so this game is great. Its like playing the air guitar to well known songs, except you actually can hear yourself playing. I'm only playing on easy mode right now with the first three frets, and it's starting to get a little difficult. I suggest this game to anyone who dreamed of being in the limelight playing with a rock band but just couldn't hack it. It's just alot of fun!
  9. The zebra story about the bird poop and the charcol was great! I have to remember that to tell to the step-kids. But I do have to say, that animals have a basic color of skin as m^e said, and there are different variations of zebra, so it would all depend. The others, well, I have no clue but it's cool to here the theories. And it's true you learn something new everyday. I never knew hockey rinks were painted and taped. Great topic!
  10. First of all, I don't really know how to get my registration/login page to be the first thing visitors see. But this is the error message I get: Not Found The requested URL /ftv_registration was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.34 Server at http://forums.xisto.com/no_longer_exists/ Port 80 As for the scripts, I will put them here, though they can be a bit much. My login.php file: <?php mysql_connect ($server, $nickname, $password) or die (mysql_error); mysql_connect_db($database) or die (mysql error);?> My config.php file: <?php$nickname = "nickname";$password = "password";$database = "lonebyrd_FTV";$server = "localhost";?> My functions.php file: <?phpfunction generateCode($length = 10){ $password=""; $char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; srand((double)microtime()*1000000); for ($i=0; $i<$length; $i++) { $password = $password . substr ($chars, rand() % strlen($chars), 1); } return $password; } ?> My registration.php file <?php require("config.php"); require("functions.php"); //echo some styles to spice it up... I can change this body background=131313; font-family=Verdana, Arial; font-weight=bold; font-size=9px; color=FFFFFF; .register_box { border: 1px solid #323232; background: #202020; font-family: Verdana, Arial; font-weight: bold; font-size: 9px; color: #FFFFFF; } </style>//I can change things down to this point</head> switch($_GET['action']) { case "new": //-------------------------------------- // [New Registration] //-------------------------------------- if(!isset($_POST['register'])) { echo " <form action='register.php?action=new' method='POST'> Name: <br /> <input type='text' name='name' class='register_box'> <br /> Email: <br /> <input type='text' name='email' class='register_box'> <br /> Nickname: <br /> <input type='text' name='nickname' class='register_box'> Password: <br /> <input type='password' name='password' class='register_box'> <br /> <input type='submit' name='register' value='New Registration!' class='register_box'> </form> "; } elseif(isset($_POST['register'])) {$name = mysql_real_escape_string($_POST['name']); $email = mysql_real_escape_string($_POST['email']); $nickname = mysql_real_escape_string ($_POST['nickname']); $password = mysql_real_escape_string($_POST['password']); $activation_code = generateCode(25); $nameq = "SELECT name FROM registration WHERE username = '$name' LIMIT 1"; $emailq = "SELECT email FROM registration WHERE email = '$email' LIMIT 1"; //put errors into an array I need to change these if I change the db $errors = array(); if(empty($name)) { $errors[] = "The name field was blank! <br />"; } if(mysql_num_rows(mysql_query($nameq)) > 0) { $errors[] = "The name given is already in use! Please try another one! <br />"; if(empty($email)) { $errors[] = "The email field was blank! <br />"; } if(mysql_num_rows(mysql_query($emailq)) > 0) { $errors[] = "The email given is already in use! Please try another one! <br />"; if (mysqul_num_rows (mysql_query ($nickname)) > 0 ) { $error[] = "That nickname is already taken. Please try another one.<br />" } if(empty($password)) { $errors[] = "The password field was blank! <br />"; } } if(count($errors) > 0) { foreach($errors as $err) { echo $err; } } else { $sqlq = "INSERT INTO registration (name, email, nickname, password, is_activated, activation_code)"; $sqlq .= " VALUES ('$name', '$email', '$nickname', '".md5($password).", '0', '$activation_code')"; mysql_query($sqlq) or die(mysql_error()); echo "Thanks for registering! You will recieve an email shortly containing your validation code, and a link to activate your account!"; mail($email, "New Registration, http://forums.xisto.com/no_longer_exists/;, " Thanks for registering on FTV. Here are your login details: Nickname: ".$nickname." Password: ".$password." In order to login and gain full access, you must validate your account. Click here to validate: [url="http://forums.xisto.com/no_longer_exists/register.php?action=activate&user;"&; Thanks! [lonebyrd] "); } } break; } ?> My activate.php file: <? case "activate": //-------------------------------------- // [Activate Account] //-------------------------------------- if(isset($_GET['nickname']) && isset($_GET['code'])) { $nickname = mysql_real_escape_string($_GET['nickname']); if(mysql_num_rows(mysql_query("SELECT email FROM registration WHERE nickname = '$nickname'")) == 0) { echo "That username is not in the database!"; } else { $activate_query = "SELECT is_activated FROM registration WHERE nickname = '$nickname'"; $is_already_activated = mysql_fetch_object(mysql_query($activate_query)) or die(mysql_error()); if($is_already_activated->is_activated == 1) { echo "This user is already activated!"; } else { $code = mysql_real_escape_string($_GET['code']); $code_query = "SELECT activation_code FROM registration WHERE nickname = '$nickname' LIMIT 1"; $check_code = mysql_fetch_object(mysql_query($code_query)) or die(mysql_error()); if($code == $check_code->activation_code) { $update = "UPDATE registration SET is_activated = '1' WHERE nickname = '$nickname'"; mysql_query($update) or die(mysql_error()); echo "User $nickname has been activated! Thanks! You may now login!"; } else { echo "The activation code was wrong! Please try again!"; } } } } else { echo "No ID or user given to activate!"; } break; ?> Any advice for changing things, or if people see what I am doing wrong, PLEASE let me know. I'm trying my best to figure this out, but I am getting lost. A little explaination for changes would be nice too, if I'm not being too pushy. Thanks.
  11. I realize it isn't free to run a free web hosting service. But, I didn't relize that OpaQue went through so much. I thank this place so much for all it offers, and though I have before found it hard to post here, I love this place. Now that I have my site in the works, I have found plenty of things to post about.When I first found out about this site, there was alot of negative critasizim. I don't remember now what site I was on, but about 6 people rated Xisto. Of the 6, only one said how good the services were. All the others complained about the posting system and how they would never keep posting on a site to be posted. Although most of them did say Xisto did offer alot.My point is, I believe it is fully worth every post I put in here to have the great services offered. And knowing the effort that is put into Xisto just makes me want to make my participation even better.Keep up the great job!
  12. I was a strictly IE only person before coming to this forum. But after reading some things other members have said about FF, and all the negative things there were to IE, I decided to download FF and give it a test run. At the time, I still had another person still using my computer who would be lost if I got rid of IE so I kept it as my default browser. But I have to say, I a completely satisfied with FireFox. I have had no problems with it at all, and I love the extensions it has. Now that I am the only one who regularly uses my computer, FF IS my default browser, and I plan to keep it that way.
  13. That is the kind of email that I like to get! I'm used to the 'rednecks' and computer jokes, so that was a good change. I know it's not nice to make fun of people, but alot of times it is the people that are talked about in the jokes themselves, who make up such jokes. Like Jeff Foxworthy, if anyone has heard of him, he's one funny 'redneck'.
  14. When I was a teenager, I was diagnosed with bipolar and depression. I needed to find things to lift myself out of the depressive periods I was having so often. My parents also did not like to see me so depressed all the time. So when they saw that I was interested in music, they leaped at the chance to get me the instuments that I was interested in. I really wanted a drum set, but they weren't quite ready for that kind of noise. So my next choice was the electric guitar. After getting my guitar, I learned about 4 chords and made up a song about a bird that was on a telephone wire by itself, thinking how he'd done his family wrong. Then a boy with a gun shot him off the wire and the birds last thought was of his family. I named this song... Lonebyrd
  15. Everyone brings up alot of points. 1st point... I could use the private message system, but my index file was never really used for registration/login purposes. Maybe that is where I'm getting confused in how to get the registration page to start up. 2nd point... I don't know if I am supposed to be doing this coding through my XAMMP first or just do it on my Xisto acct. Right now, I am using everything available to me through the cpanel in my Xisto acct. I've done some things in PHP Designer and transfered it to the cpanel, but is that what I am supposed to do?But if anyone is up for looking at some (probably very messed up) php code, let me know and I will PM the coding I've done. I could put them here, if people would rather I do that. I just don't know if that is what is normally done, and I don't want to be a disruption.
  16. I'm totally new to all this, and I've just done a registration/login script. It has 5 different files that I put stuff in, plus a database. When I try to see how it looks on my website, well, it just doesn't show up. What I want to know is, how can I tell what I'm doing wrong? I don't always understand what the editors in the script programs are trying to say. Is there anyone out there who can help? My scripts are written in PHP with a MySql database. Boy, this all gets confusing, but I sure love every minute of it!
  17. Quatrux, one of the times I heard you mention PHP Designer, I went and downloaded it and I got the 2006 version straight away. Looks very good. Haven't done much coding on it as of yet, but what I have done, I got a little frustrated with. The one thing I couldn't figure out was how to get it to show in my browser window. But a very solid program otherwise.
  18. I have one question... If a head were to be 'transplanted', besides everything that was stated, wouldn't there be a problem of having a heart. It is a dead body, after all, that the head is being transplanted to, isn't it?
  19. I say who cares what it is named, how does it play, that's what I want to know. Just because a system has a weird name isn't going to distract me from buying one. Look at the points they made with Virgin Airlines, Catapiller Construction etc... It's not in the name, it's in the game.
  20. I am trying to get a date and time to show up on my webpage, but for some reason, all I get is the name just above it. Here is the code, I know I must be a complete bafoon: <html><head><TITLE> Fantasized TeleVision</TITLE></head><body background="http://i6.photobucket.com/albums/y215/lonebyrd/TVF/Background.jpg"><center><h1><font color=red><u>Fantasized TeleVision</u></font></h1> </center><align="right">New Rork City</align><?php $today = date("F j, Y, g:i a"); ?></body></html> I know the code must be wrong somewhere, but I just cant figure it out. Can someone please help me out?
  21. I have a question about making a database. I recently downloaded a registration/login script and tried to use it, but then decided to go through a tutorial and make my own. Now, I made a config.php file which contains this: <? php$username = "username";$password = "password";$database = "database";$server = "localhost";mysql_connect {$server, $username, $password} or die [mysql_error]}};mysql_connect_db{$database} or die [mysql error]}};?> I made the database as written out in the tutorial, then typed in my website and it read: 'Parse error: parse error, unexpected T_VARIABLE in /home/lonebyrd/public_html/config.php on line 2' My question is, is there somewhere that I have to enter my username, password, and email in the database so the registration page will come up?
  22. Talk about the ability to make people more lazy. Really, people can't type anymore? Yes, this could be great for disabled people, but they have many devices made for them that help. I can't understand why everyone is so involved with taking tasks so easy, such as sitting down typing, and trying to make it easier. What is this world coming to? I'm sorry if I'm ranting, but laziness gets you nowhere. But i guess it will get Google somewhere.
  23. I need to wait and see a while til I decide which is my best choice. Eventually, I will probably end up playing each system at a friends house, because they will get them before me. I won't be able to afford the high price, and I'm also not going to get either one until the kinks are worked out. But after I've tested both I will chose, and not until. But most likely, in the end, I will own both a 360 and a PS3, as now I have and XBox and a PS2. What can I say, I'm a sucker for the console games.
  24. O.K. Let me see. If you have a registration/login script where users sign-up with certain info, that info needs to be stored somewhere, right. Well, when I downloaded this registration/login script it came with all sorts of folders/files, and one of the files was called admin.php. Admin.php is where, according to the script I downloaded, all of the input info was to be stored.So essentially, what I was trying to do, was make sure all the info that was input into my registration/login area of my site, which has a database name 'cscp...' table 'prefrences', would be stored in the admin.php file to be retrieved when I need it.If that doesn't help then I don't know what to do. I don't know how to make registration/login pages. If someone knows a better way to store the database info for user info, let me know.
  25. Now that I've got the index.html FILE straightend out, how do you get more than one page to show on a website? I'm trying to get a sign-in page on my web-site, and I made a folder under public_html called 'Login' were all the info from the login script I downloaded went. My question is, how do I get a login page to actually show up, if the only thing that shows up has to be under index.html?
×
×
  • 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.