Jump to content

desjardins2010

Members
  • Posts

    187
  • Joined

  • Last visited

Everything posted by desjardins2010

  1. This script was working fine yesterday i havn't changed anything?? not it don't register the user upon completing the script no error, just when you hit submit it refreshes and does nothing? <?php //check for submit $submit =$_POST['submit']; //gather POST variable $fullname =strip_tags($_POST['fullname']); $email =strip_tags($_POST['email']); $username =strip_tags($_POST['username']); $password =strip_tags($_POST['password']); $password2 =strip_tags($_POST['password2']); if ($submit) { //check that fields were filled in if ($fullname&&$email&&$username&&$password&&$password2) { //check to see if our two password fields match if ($password==$password2) { $password = md5($password); // register the user //open database $connect = mysql_connect("localhost", "root", ""); mysql_select_db("users"); //begine insert $queryreg = mysql_query("INSERT INTO members VALUES ('','inet_aton('127.0.0.1')','$fullname','$email','$username','$password')"); if ($queryreg) { echo "Thanks, For Registering! Click <a href=\"index.php\">HERE</a>To Login!"; } } //otherwise if passwords don't match else { echo "<font color='red'>The passwords you entered do not match</font>"; //end of checking password } } else { echo "<font color='red'>Please enter all fields!</font>"; } } //end check for submit ?> <form action='testreg.php' method="post"> <table align="center"> <tr> <td> Your Full Name: </td> <td> <input type="text" name="fullname" value="<?php echo $fullname; ?>"> </td> </tr> <tr> <td> Email Address: </td> <td> <input type="text" name="email" value="<?php echo $email; ?>"> </td> <tr> <td> Choose Username: </td> <td> <input type="text" name="username" value="<?php echo $username; ?>"> </td> </tr> <tr> <td> Password: </td> <td> <input type="password" name="password"> </td> </tr> <tr> <td> Retype Password: </td> <td> <input type="password" name="password2"> </td> </tr> </table> <p> <center><input type="submit" name="submit" value="Register"></center> </form>
  2. aww shoot thanks man, sometime get another set of eyes... srry
  3. line 11 the while loop <?php //include connect $connect = mysql_connect("localhost","root","") or die ("Could Not Connect To Server"); mysql_select_db('npcs') or die ("Could Not Select Database"); $query = mysql_query("SELECT * FROM npc WHERE LEVEL=1") or die ("Could Not query Database"); echo "<table width='220' border='1' align='center'><tr><th>NPC NAME</th><th>JOB DESCRIPTION</th></tr><tr><th>LEVEL</th></tr><tr><th>EXPERIENCE</th></tr><tr><th>CASH</th></tr><tr><th>REPUTATION</th></tr>" while ($row = mysql_fetch_array($query)) { //set varibles from query $npcname = $row['npcname']; $level = $row['level']; $jobdes = $row['jobdes']; $exper = $row['exper']; $cash = $row['cash']; $rep = $row['rep']; //end getting varibles echo "<tr align='center'><td>{$row['npcname']}</td><td>{$row['jobdes']}</td><td>{$row['level']}</td><td>{$row['exper']}</td><td>{$row['cash']}</td><td>{$row['rep']}</td></tr>"; } ?>
  4. hmmm that makes sence... but to add the IP to database when they register lets say they are going to be given a few initial values level, ip, cash extt i can't just say insert into blah blah blah 192.169.1.1 I have to enter it as an inet_iton???
  5. I'm reading the inet_aton functions now... so setting up the database though I have a field called IPadress so I enter anything in there? to compare too? not sure how to accomplish this I see the fucntion calls for a mathamatical equation that will convert the IP to a numaric number but how do I get the inital entry?
  6. I'm trying to get a field in the data base to accept the value 192.168.1.1 or an IP address for that matter I have tried decimal and bigint all come back cutting it and only showing 192
  7. srry error is Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/heaven/public_html/tester/view_thread2.php on line 19 Posted By:
  8. or should I say can you tell me WHAT is wrong? getting error on line 19 Parse error: syntax error, unexpected '[' in /home/heaven/public_html/tester/view_thread2.php on line 19 <?php include("connect.php"); mysql_select_db("heaven_forum") or die ("Could Not Select Database"); $recent = mysql_query("SELECT phpbb_posts.id AS post_id, phpbb_posts.topic_id AS topic_id, phpbb_posts.forum_id AS forum_id, phpbb_posts.poster_id AS poster_id, phpbb_topics.topic_title AS title, phpbb_users.username AS usernameFROM phpbb_posts, phpbb_topics ON phpbb_posts.topic_id=phpbb_topics.id, users ON phpbb_posts.poster_id=users.idORDER BY post_time DESC LIMIT 5"); //pull array $recent_row = mysql_fetch_assoc($recent); //set varibles pulled $topic_name = $recent ['title']; $poster = $recent['usernameFROM']; echo $topic_name; echo "Posted By: $poster"; ?>
  9. Thanks alot guys, I think I can manage this now.. thats great I love this place btw! cheers
  10. Hey All? so I have thsi script in place that returns the last 5 forum post based on time, however I have also set them to an array returning all 5 results I want to be ablet to plug the first on in somewhere then plug the second somewhere and so forth... I tried to use an echo $topic_name but thats shoots out all 5 results.. any ideas? is there a way to use echo and limit the output then use it again and it would start at the second one? <?php include("connect.php"); mysql_select_db("heaven_forum"); $recent = mysql_query("SELECT * FROM phpbb_posts ORDER BY post_time DESC LIMIT 5"); while ($recent_row = mysql_fetch_assoc($recent)) { //get data $post_id = $recent_row['post_id']; $topic_id = $recent_row['topic_id']; $forum_id = $recent_row['forum_id']; $poster_id = $recent_row['poster_id']; $post_time = $recent_row['post_time']; //get topic name $topic_name = mysql_query("SELECT topic_title FROM phpbb_topics WHERE topic_id='$topic_id'"); $topic_name = mysql_fetch_assoc($topic_name); $topic_name = $topic_name['topic_title']; //get username $username = mysql_query("SELECT username FROM phpbb_users WHERE user_id='$poster_id'"); $username = mysql_fetch_assoc($username); $username = $username['username']; echo $topic_name; echo "Posted By: $username"; } ?>[code=php:0]
  11. Is your database field setup to enough charc for the length of the whole city?
  12. youtube - phpacademy helped me alot
  13. lmao didn't post the link http://indie-resource.com/forums/
  14. Seems like you need alot more than help seems your looking to have it done for you... check this forum out the video section at the bottom runs you thought the process of building an online mmorpg best luck!
  15. getting the same thing just echoing $bankacct no errors??
  16. Hey guys i don't know whats up here everything looks ok? it just returning $bankacct instead of pulling the info from the database not getting any errors though that says i'm not connected? <?php //this script will pull users programs and present them //connect to db $connect = mysql_connect("localhost","removed","removed") or die ("Could not connect to database"); mysql_select_db("heaven_users") or die ("Could not select database"); $query = mysql_query("SELECT * from members WHERE username='Theaf'"); $numrows = mysql_num_rows($query); if($numrows!=0) { while ($row = mysql_fetch_assoc($query)) { //set varibles for values in database $bankacct = $row['bankaccountnumber']; $balance = $row['balance']; $virusscanner = $row['virusscanner']; $passwordcracker = $row['passwordcracker']; $iptracer = $row['iptracer']; echo '$bankacct'; } } else echo "dunno something wrong"; ?>
  17. K, I have a page that when viewed in 1366*768 (my resolution) it's fine I don't have to scroll right left up and down to view the page.. however when I view in say anything else your haveing to scroll up and down left and right... how can I make it that it's static for every resolution?? or can I
  18. Hey Guys/Gals I have a page that resembles your desktop the issue were having is that when you view the page you have to scroll up and down left and right and this isn't what we want.. we want it to be full screen no scrolling needed for any user regardless of there resolution being used.. how can I accomplish this?
  19. AHHHHHH your great man thanks alot... that works like a dream I had it set to 15 char
  20. in register.php I'm entering a password of 0614jef and it echos 0614jef then would encypt it to be md5, values in login should be matching this kinda makes no sence?
  21. ok so this code echo ($dbpassword)."<BR>"; echo ($password); returns this a8967cdb80c6538 a8967cdb80c6538c99d13cb01f870c63 where the c99.... coming from?
  22. I would agree with that statment and tired that i don't get why it's not working.. that code plugged in does the same thing incorrect/mismatch???
  23. snipplet example? cause I tried to in the login.php file after setting the _POST varibles to then take the $password and $password =md5($password); that didn't change anything
×
×
  • Create New...

Important Information

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.