Jump to content

dominic600

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

Everything posted by dominic600

  1. yeah i get what your saying, i like being able to figure stuff out for my self lol but yeah i got the commenting part to where it displays the messages and everything now i have to figure out how to make it to where you have to be loged in to access it lol
  2. wow, thanks thats alot of helpfull info. Im going to give this a try. Ill let you know how it works out. But thanks again for all the info!
  3. oh ok sweet! im going to give this a try tonight and take a break from the site. lol
  4. yeah man! that really cleaned up my code lol but thanks for the imput it now looks decent now haha
  5. yeah I mostly understand, or at least I think I do. or like if I follow a tutorial on making a comments page, is there a way I can impliment my login script into it so you must be logged in to post? Sorry if im not making sense when I ask questions. I'm fairly new and really dont know what all everything does, as you could probably tell from all my threads. lol.
  6. looking at tutorials, I can do it but how would I go about connecting it to my database? like they all say i need to make a new table... And I would like to make it to where they have to be logged into the site inorder to leave a comment.
  7. yeah, i have my database all set up and stuff. Like i have all my login, register, activate, and all that stuff working properly.
  8. Does any one know where a good tutorial is on commenting systems. I cant seem to find a good tutorial for what i want to do. Like i want people to be able to comment on each individual post i make on my blog or i may just make a new single page for people to comment but only people that have register on the web site. Thank you, Dominic
  9. I am not sure about my static iP or whatever but i have seen videos of ways you can fix that. and as far as internet im not sure how fast mine is but its deffintly not slow but my question is how do i make the site live to the internet? like i got it all set up for testing out my site but i wanna make it so i can access it anywhere and anyone can access it. Im just want to do this for tempary just to see how the site is going to work and if it does good ill eventually get a paid hosting service.
  10. it looks alot better now lol but now i am stuck with one thing. after i did that now everything is bunched together and idk how to put spaces in between the paragraphs..
  11. yeah i tried to get out of the tables but i couldnt figure out how to get it to work out good with my pictures. lol but yeah i need to find another way to make it easier cuase i still have clost to 10 more tables to do lol
  12. theres the code heres the live site http://tprofiletesting.net23.net/index.php and sorry for putting in the wrong section, i didnt think about it not being php. <hr /> <table border=0 width=1000 bgcolor=#CCC height=220 class"ctntable"> <tr height=150> <td width=60%> Here is my 1990, 12 vavle, 4X4, Regular cab, Long bed, Dodge Cummins turbo diesel. It was old man owned and driven. Very clean, runs great! The truck is completly stock, gets around 20mpgs city and close to 30 on the highway.It is all stock, for now, but I have plans of doing many things to it. Truck was used to haul 14k plus of rock on a gooseneck trailer. No rust, and completly undercoated. 3in stock lift. Truck is AMAZING, and not to mention the 12v is known as the "million mile motor" as it will last forever with proper matinance! </td> <td width=40%> <img style="border:2px dotted #545565;" src="images/cummin1.jpg" width=300px height=200px /> </td> </tr> </table>
  13. alright so I thought I knew how to do this because I just did it. but for somereason it wont work on my table. like i want the tables to be rounded so it looks alot better, but for some reason I can not get it to work. and because i did all the table and coding for the table in html idk how to link it to my css. ive tried the class property and put "table.'name'" in css but it still did not work. any help would be awesome, thanks!
  14. thanks! and idk why i didnt think about reading a css manual! im going to save and go give that a reaading!
  15. So I dont have a problem or anything like that but i want to change up my header and when i put the header in no matter how wide theres always white spaces on the sides and top. My question is how do i make the header touch all edges of the webpage with no gap? Thanks, Dominic
  16. it was the login and username text boxes. but i now solved it.
  17. http://tprofiletesting.net23.net/profile.php its on everypage tho.. but up in the top right is what im talking about in the header..
  18. well the tutorial im following says to cause the way it says username and password inside the box.. idk but now it worked but now when i log out it wont bring my box back. like it just did the oppsite.
  19. I have a javascript running my login boxes like the username and password boxes. and when i login its supposed to look like "admin | Logout" well when i log in the boxes say the same and it just gives me a readout saying i logged in. theres the javascript, eventho i dont think it is wrong with that but then again idk.. function usernamebox_focus(){ var usernameboxid = document.getElementById("usernamebox"); if (usernameboxid.value == "Username"){ usernameboxid.value = ""; usernameboxid.style.color = "#000"; } } function usernamebox_blur(){ var usernameboxid = document.getElementById("usernamebox"); if (usernameboxid.value == ""){ usernameboxid.value = "Username"; usernameboxid.style.color = "#999999"; } } function passwordbox_focus(){ var passwordboxid = document.getElementById("passwordbox"); if (passwordboxid.value == "Password"){ passwordboxid.value = ""; passwordboxid.type = "password"; passwordboxid.style.color = "#000"; } } function passwordbox_blur(){ var passwordboxid = document.getElementById("passwordbox"); if (passwordboxid.value == ""){ passwordboxid.value = "Password"; passwordboxid.type = "text"; passwordboxid.style.color = "#999999"; } } and then heres the top. <?php session_start(); $username = $_SESSION['username']; $userid = $_SESSION['userid']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>1st Gen Cummins Blog | Login</title> <link href='main.css' rel='stylesheet' type="text/css"></link> <script language="javascript" src="scripts/javascript.js"></script> </head> <body> <div id='header'><div id='headercnt'>1990 Dodge Cummins Turbo Diesel <div id='status'><?php require('scripts/status.php'); ?></div> </div>
  20. im not like really stuck anywhere, like im asking is it possible to make a webserver on a computer, i know its possible but ive only done it for a lan connection. is it possible to access a webserver i create on my computer from anywhere just like as if i paid for a hosting servrice..
  21. Ok so im wanting to get my desktop to run my webserver, like is it possible to host a website live from my computer instead of having to pay for a unlimited hosting server? thanks, and anyother info you have would be awesome too.. thanks!
  22. Yes, I didnt relize that, i just relized my profile.php file was not in the folder and thats waht i have to read the login. lol sorry, for the waste of time i caused
  23. okay, so the problem I am having is that when i log in, i shouldnt be able to keep logging it and it keep telling me im loged in. like it should be that when i log in and im already loged in that it should read out "you are already loged in" but it does not do that. it was working correctly 2 night ago. heres the login.php code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>1st Gen Cummins Blog | Login</title> <link href='main.css' rel='stylesheet' type="text/css"></link> </head> <body> <div id='header'><div id='headercnt'>1990 Dodge Cummins Turbo Diesel</div><div> <div id='content'> <hr /> <table border=0 width=1000 height=40> <TR height=40> <TD colspan="2"><center>Youtube | Contact Me | Pictures | <a href='register.php'>Register</a> </center></TD> </TR> </table> <hr /> <?php $form = "<form action='login.php' method='post'> <center><table> <tr> <td>Username:</td> <td><input type='text' name='username' class='textbox'></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password' class='textbox'></td> </tr> <tr> <td></td> <td><input type ='submit' name='loginbtn' value='Login' class='button'></td> </tr> </table></center> </form>"; if ($_POST['loginbtn']){ $username = strip_tags($_POST['username']); $password = strip_tags($_POST['password']); if($username && $password){ require("scripts/connect.php"); $pass = md5(md5($password)); $query = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$pass'") or die(mysql_error()); $numrows = mysql_num_rows($query); if ($numrows == 1){ $row = mysql_fetch_assoc($query); $dbid = $row['id']; $dbuser = $row['username']; $date = ("F d, Y"); mysql_query("UDATE users SET last_login='$date' WHERE id='$dbid'"); $_SESSION['user'] = $dbuser; $_SESSION['userid'] = $dbid; echo "You are now loged in.<a href='index.php'> Click here </a>to return Home."; } else echo "Your Username and/or Password are incorrect."; } else echo "You did not fill in the correct fields."; } else echo "$form"; ?> <hr /> </div> <div id='footer'></div> </body> </html>
  24. i guess i need a break cause ive been staring at this so long i cant notice the obivious stuff. cause that fixed everything! Thanks for input man!
  25. Well theres my code that would put the password into the database. maybe the double md5 is whats messing it up? <?php require("styles/top.php"); ?> <div id='content'> <div id='full'> <?php $form = "<form action='register.php' method='post'> <table> <tr> <td></td> <td>Fields indicating <font color='red'>*</font> are require.</td> </tr> <tr> <td>First Name:</td> <td><input type='text' name='firstname'><font color='red'>*</font></td> </tr> <tr> <td>Last Name:</td> <td><input type='text' name='lastname'><font color='red'>*</font></td> </tr> <tr> <td>Username:</td> <td><input type='text' name='username'><font color='red'>*</font></td> </tr> <tr> <td>E-mail:</td> <td><input type='text' name='email'><font color='red'>*</font></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password'><font color='red'>*</font></td> </tr> <tr> <td>Confirm Password:</td> <td><input type='password' name='repassword'><font color='red'>*</font></td> </tr> <tr> <td>Avatar:</td> <td><input type='file' name='avatar'></td> </tr> <tr> <td>Website:</td> <td><input type='text' name='website'></td> </tr> <tr> <td>Youtube User Name:</td> <td><input type='text' name='youtube'></td> </tr> <tr> <td>Bio:</td> <td><textarea name='bio' cols='35' rows='5'></textarea></td> </tr> <tr> <td></td> <td><input type='submit' name='submitbtn' value='Register'></td> </tr> </table> </form>"; if ($_POST['submitbtn']){ $firstname = strip_tags($_POST['firstname']); $lastname = strip_tags($_POST['lastname']); $username = strip_tags($_POST['username']); $email = strip_tags($_POST['email']); $password = strip_tags($_POST['password']); $repassword = strip_tags($_POST['repassword']); $website = strip_tags($_POST['website']); $youtube = strip_tags($_POST['youtube']); $bio = strip_tags($_POST['bio']); $name = $_FILES['avatar'] ['name']; $type = $_FILES['avatar'] ['type']; $size = $_FILES['avatar'] ['size']; $tmpname = $_FILES['avatar']['tmpname']; $ext = substr($name, strrpos($name, '.')); if ($firstname && $lastname && $username && $email && $password && $repassword){ if ($password == $repassword){ if (strstr($email, "@") && strstr($email, ".") && strlen($email) >= 6){ require("scripts/connect.php"); /*$query = mysql_query("SELECT * FROM users WHERE username='$username' ");*/ $query=mysql_query("SELECT * FROM users WHERE username='$username' ") or die(mysql_error()); $numrows = mysql_num_rows($query); if ($numrows == 0){ /*$query=mysql_query("SELECT * FROM users WHERE email='$email' ");*/ $query=mysql_query("SELECT * FROM users WHERE email='$email' ") or die(mysql_error()); $numrows=mysql_num_rows($query); if ($numrows == 0){ $pass = md5(md5($password)); $date = date("F d, Y"); if($name){ move_uploaded_file($tmpname, "avatars/$username.$ext"); $avatar = "$username.$ext"; } else $avatar = "default_avatar.png"; $code = substr (md5(rand(11111111111, 999999999999999)), 2, 25); mysql_query("INSERT INTO users (`first_name`,`last_name`,`username`,`email`,`password`,`avatar`,`bio`,`website`,`youtube`,`last_login`,`active`,`code`,`locked`,`date`) VALUES ( '$firstname', '$lastname', '$username', '$email', 'pass', '$avatar', '$bio', '$website', '$youtube', '', '0', '$code', '0', '$date')"); /*mysql_query("INSERT INTO users (Field, Type) VALUES ('', '$firstname', '$lastname', '$username', '$email', 'pass', '$avatar', '$bio', '$website', '$youtube', '', '0', '$code', '0', '$date')");*/ $webmaster = "Admin@trucksite.com"; $subject = "Activate Your Account!"; $headers = "From: Admin <$webmaster>"; $message = "Hello $firstname.\n\nWelcome to trucksite below is a link for you to activate your account!.\n http://tprofiletesting.net23.net/activate.php?code=$code"; mail($email, $subject, $message, $headers); echo "Your activation email has been sent to <b>$email</b>."; } else echo "That email is currently in use."; } else echo "That username is currently in use."; } else echo "You did not enter a vaild email."; } else echo "Your passwords did not match."; } else echo"You did not fill in all the required fields."; } echo "$form";
×
×
  • 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.