supermerc Posted March 6, 2007 Share Posted March 6, 2007 Hey, I have my page so members can register but my text doesn't appear. Im guessing it has to do with the style but I cant find what is wrong. Here is my code: <?php //echo some styles to spice it up... echo " <style> body { background: #ffffff; font-family: Verdana, Arial; font-weight: bold; font-size: 9px; color: #000000; } .register_box { border: 1px solid #323232; background: #202020; font-family: Verdana, Arial; font-weight: bold; font-size: 9px; color: #FFFFFF; } </style> "; switch($_GET['action']) { case "new": //-------------------------------------- // [New Registration] //-------------------------------------- if(!isset($_POST['register'])) { echo " <form action='register.php?action=new' method='POST'> Username: <br /> <input type='text' name='username' class='register_box'> <br /> Email: <br /> <input type='text' name='email' class='register_box'> <br /> 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'])) { $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $email = mysql_real_escape_string($_POST['email']); $activation_code = generateCode(25); $userq = "SELECT username FROM user_system WHERE username = '$username' LIMIT 1"; $emailq = "SELECT email FROM user_system WHERE email = '$email' LIMIT 1"; //put errors into an array $errors = array(); if(empty($username)) { $errors[] = "The username field was blank! <br />"; } if(mysql_num_rows(mysql_query($userq)) > 0) { $errors[] = "The username given is already in use! Please try another one! <br />"; } if(empty($password)) { $errors[] = "The password field was blank! <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(count($errors) > 0) { foreach($errors as $err) { echo $err; } } else { $sqlq = "INSERT INTO user_system (username, password, email, is_activated, activation_code)"; $sqlq .= "VALUES ('$username', '".md5($password)."', '$email', '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", " Thanks for registering on Random. Here are your login details: Username: ".$username." Password: ".$password." In order to login and gain full access, you must validate your account. Click here to validate: http://random.awardspace.biz/register.php?action=activate&user=".$username."&code=".$activation_code." Thanks! [Webmaster] "); } } break; } ?> Thanks for helping. Quote Link to comment Share on other sites More sharing options...
Psycho Posted March 6, 2007 Share Posted March 6, 2007 I'm not going to read through all of your code, but I see that in your body style you have given the background and the text the color white. Quote Link to comment Share on other sites More sharing options...
supermerc Posted March 6, 2007 Author Share Posted March 6, 2007 Mm ya that doesnt help, but the background used to be black, and text white, so it still doesnt work. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted March 6, 2007 Share Posted March 6, 2007 it looks like you only have one case in your switch statement, and this is executed by a $_GET variable. is there a value for action in the url? it should look something like www.your_domain.com/yourpage.php?action=new. Quote Link to comment Share on other sites More sharing options...
supermerc Posted March 6, 2007 Author Share Posted March 6, 2007 Eum, Im pretty sure the script itself works, The problem is that I cant see anything because something is wrong with the styles. Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted March 6, 2007 Share Posted March 6, 2007 Eum, Im pretty sure the script itself works, The problem is that I cant see anything because something is wrong with the styles. then take it to the javascript forums. this is a php forum. Quote Link to comment Share on other sites More sharing options...
supermerc Posted March 6, 2007 Author Share Posted March 6, 2007 There is no java script in there... Quote Link to comment Share on other sites More sharing options...
tarun Posted March 6, 2007 Share Posted March 6, 2007 How About The CSS Forums Or The HTML Forums Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted March 6, 2007 Share Posted March 6, 2007 There is no java script in there... there are plenty of javascript forums on the internet. Quote Link to comment Share on other sites More sharing options...
supermerc Posted March 6, 2007 Author Share Posted March 6, 2007 I guess, but im talking in my script... the problem isnt about java its about php Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted March 6, 2007 Share Posted March 6, 2007 Eum, Im pretty sure the script itself works, The problem is that I cant see anything because something is wrong with the styles. I guess, but im talking in my script... the problem isnt about java its about php ...wasting my time, buddy. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 6, 2007 Share Posted March 6, 2007 Styles have nothing to do with PHP. Get the generated source from your script and run it through both a CSS validator and an HTML validator. The errors generated should show you the problems. Ken Quote Link to comment Share on other sites More sharing options...
supermerc Posted March 6, 2007 Author Share Posted March 6, 2007 Fixed it Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 6, 2007 Share Posted March 6, 2007 What was the problem? Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.