Cetanu
-
Posts
395 -
Joined
-
Last visited
Never
Posts posted by Cetanu
-
-
Yep. I was looking through it and all, even began using ems, but instead I have decided to go back to a fluid layout using %.
-
So would it be logical to keep that nav menu for quick, easy navigation for people with JavaScript, but then have an actual index page?
That might solve the JS problem...but what about everything else?!
-
OH! That's what em's are for?!
Thanks!
-
Not sure >.> Maybe I'll switch it so that login is in the dropdown menu.
Do a lot of people have JavaScript disabled?!?!
-
Firefox is amazing!!! I'll look into that.
-
You can use JS to change stylesheets?!! That's amazing...
It would be a lot of work, however, I'll take your advice, but how am I supposed to know what it will look like in those resolutions if I don't have them?
-
I have been using CSS for like 7 months now, mainly teaching myself. My biggest problem isn't cross-browser issues, it's cross-monitor issues! On my laptop the site looks one way, but on the desktop it looks all smushed or expanded.
Any idea how I can fix this?
I try to use % width so it is relative to the screen, instead of px.
-
Okay, thanks guys
But one question: is it IE, or is it your screen because some screens have more pixels and blahblahblah. I tried to use % so that it would depend on the screen, but I guess it failed.
Plus, I tried to make it feel more ancient. How would you recommend I fix that background, which I kind of liked?
-
Thanks, guys!
-
Well I am storing them in a table on the database, but I wanted to show that table on a regular page as a memberlist (without the passwords).
-
I was told that there was a way to make a memberlist by including the members table from my database. Is that true? Or do I need to make a table that I physically need to update whenever someone joins?
If I include the database table, how would I hide users' passwords?
-
Dunno what half of that means.
I got the gist, though.
-
This is my newest site, and I just began building it.
All feedback is welcome, preferred, and needed
-
If I wanted members on a site to have a profile page, it would just be a page that pulls their info from my database, right?
How would I go about doing this (what kind of script would I need?) ?
-
Thanks for all the help, guys! I, er, we fixed it!!
-
Guys, this still doesn't work! I dunno why, either.
-
What do the things I need to address mean? I don't get that, pro'ly 'cause I'm new to PHP.
In the quoted portion of the code below, see where you have $username? There are 2 instances of $username. Find them both. The problem is that the variable $username is undefined. You can fix that by defining it to equal $_POST['username'] or just change $username to {$_POST['username']} (yes with the curly braces due to variable interpolation).
....
Now in the login script, why are you setting the cookie again? Look at the quoted lines of code below. Not only does it not make sense to set the cookie again, but $username is also not defined there.
<?php setcookie("loggedin", "TRUE", time()+(3600 * 24)); setcookie("mysite_username", "$username"); ?>
In your last file, use $_COOKIE instead of $HTTP_COOKIE_VARS.
Thanks!!!! I'll do those and get back to you.
-
Hey all, I'm new here, but I really need some help. I have a very basic login script for my new website. It works when people register, and it works when I login with my username and password. BUT, on the home page it is supposed to say "Welcome, USERNAME", but it only shows "Welcome,".
No username. Below are the codes and stuff, I probably did something stupid to it. Please help
Script for Login Form to Connect to!
<?php include("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); $match = "select id from $table where username = '".$_POST['username']."' and password = '".$_POST['password']."';"; $qry = mysql_query($match) or die ("Could not match data because ".mysql_error()); $num_rows = mysql_num_rows($qry); if ($num_rows <= 0) { echo "Sorry, there is no username $username with the specified password.<br/>"; echo "<a href=log.php>Try again</a>"; exit; } else { setcookie("loggedin", "TRUE", time()+(3600 * 24)); setcookie("mysite_username", "$username"); header('Location:http://mythscape.freezoka.com/main.php'); die(); } ?>
Next, I will show some of the code for the LOGIN page.
<?php setcookie("loggedin", "TRUE", time()+(3600 * 24)); setcookie("mysite_username", "$username"); ?> <html> <head><title>Login or Register</title> <link rel="stylesheet" href="site.css" type="text/css" media="screen"> <script type="text/javascript"> function cacherVoir(theDIV){ leStyle = document.getElementById(theDIV).style ; if(leStyle.display == "block") { leStyle.display = "none"; } else{ leStyle.display = "block"; } } </script> </head> <body><div id="whole"> <table> <tr><th><a href="#" onclick="cacherVoir('myDiv'); return false;"><p class="table">Register!</p></a></th></tr> <tr><td class="content"> <div id="myDiv" style="display:none;"><form action="register.php" method="post"> Pick a Username: <input type="text" name="username" size="20"><br/> Pick a Password: <input type="password" name="password" size="20"><br/> Enter your Email: <input type="text" name="email" size="20"><br/> <input type="submit" value="Sign Up"> </form></div></td></tr></table> <div id="mid"> <form action="login.php" method="post"> Username: <input type="text" name="username" size="20"><br/<br/> Password: <input type="password" name="password" size="20"><br/> <input type="submit" value="Log In"> </form> </div> </body> </html>
Finally, I will show the script that is supposed to say "Welcome, username". This is on the homepage.
<?php if (!isset($_COOKIE['loggedin'])) { $link_reg = '<a href="user_login.php">Register</a><br/>'; echo("You are not logged in!<br/>"); include "log.php"; echo $link_reg; } else{ $link_logout = '<a href="logout.php">Logout</a><br/>'; $mysite_username = $HTTP_COOKIE_VARS["mysite_username"]; echo ("Welcome, $mysite_username <br/>"); echo $link_logout; } ?>
Any help will be reeeeeally appreciated. Thanks
MythScape
in Website Critique
Posted
Okay, so, I took your advice and I've completely reconstructed the way MythScape is set up. I looked into a more liquid, less cluttered layout, but the new one is still being worked on (color scheme and font-size-- that's it).
I want to know what you think of it NOW.
I've tested it in every browser size under 1200 that's known to man and it re-sizes. I think I've got the organization down, too. Now, I feel it's ready to be worked on.
http://mythscape.freezoka.com/main.php (maybe you'll need to refresh if you looked before).
THANKS!