mcovalt Posted March 29, 2008 Share Posted March 29, 2008 Anyone know why my scripts won't sign people up for my site? http://goboone.net/~mcovalt/signup.php Here is the script I wrote to login people: <? require_once('dbconnect.php'); mysql_query("INSERT INTO `users` (`user_id`, `email`, `password`, `handle`) VALUES (NULL, '{$Email}', '{$password}', '{$UserName}'"); $affected = mysql_affected_rows(); if($affected == 1) { echo 'User made. Check email for password.'; } else { echo 'Failed to create user'; } ?> and here is just the plain old site code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Shout Out<title> <style type="text/css"> BODY{ font-family: Arial; color: white; font-size: 19px; margin:0px; padding: 10px; text-align:center; background: #0000CD; } #Sign_Up{ font-family:Arial; color: black; font-size: 11px; text-align: left; border: 5px solid #FF4500; padding: 15px; display: block; width: 300px; margin: auto; background: white } #Sign_Up INPUT.text { border:3px solid #696969; font-family: Arial; font-size: 24px; } #Sign_Up INPUT.button { font-size: 40px; padding: 10px; text-align: center; } #Sign_Up INPUT.link { font-size: 40px; padding: 10px; text-align: center; } #title{ background: #696969; color: white; padding: 0px 20px 0px 20px; font-size: 40px; width: 300px; margin: auto; } </style> </head> <body style="background-image: url(http://goboone.net/~mcovalt/chat/styles/color.JPG);"> <img src="http://goboone.net/~mcovalt/chat/styles/shoutout.JPG" float:left=""> <div id="title">Sign Up </div> <form id="Sign_Up" action="register.php" method="post"> Desired User Name: <br> <input class="text" name="UserName" type="text"> <br> <br> Your Email Address: <br> <input class="text" name="Email" type="text"> <br> <br> <br> <br> <br> Your New Password Will Be Sent You by Email <? $password=substr(md5(microtime()),0,rand(5,2)); ?> <br> <br> <br> <br> <input class="button" value="Sign Up" align="center" type="submit"><br> <br> <br> <br> <br> <a class="link" href="./index.php">Already Have an Account? Click Here to Sign In</a> </form> </body> </html> Link to comment https://forums.phpfreaks.com/topic/98495-failed-sign-up-script/ Share on other sites More sharing options...
phpknight Posted March 29, 2008 Share Posted March 29, 2008 Please explain what you see or what happens when you run this. I don't see anything on that page. Link to comment https://forums.phpfreaks.com/topic/98495-failed-sign-up-script/#findComment-504090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.