Jump to content

LiamProductions

Members
  • Posts

    496
  • Joined

  • Last visited

    Never

Everything posted by LiamProductions

  1. I've just tried to do the error finding and i fixed some things well i think so now this is something im getting: Error: Query was empty with query from: $query = mysql_query("INSERT into liam_database(Username, Password, Email,fsport,IP,date"); // define querystring $result = mysql_query($query) or die("Error: ". mysql_error(). " with query ". $query); // show error details does that mean its working now?
  2. Argh, Another error :@ You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; VALUES ( "liammonks", ' at line 1
  3. I took the ; off and now im getting a new errror :'( You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
  4. I just tried what you say and now i'm getting this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; VALUES ( "liam" ' at line 1
  5. Hey... Im getting a error on my script code: <?php if(!isset($_POST['submitReg'])) { if(!isset($_POST['username'])) { echo "Please enter a username"; } else { if(!isset($_POST['pass'])) { echo "Please enter a password"; } else { if(!isset($_POST['passConf'])) { echo "Please enter a confirm password"; } else { if(!isset($_POST['email'])) { echo "Please enter a email address"; } else { $user = $_POST['username']; $user = strip_tags($user); $pass = $_POST['pass']; $passConf = $_POST['passConf']; $email = $_POST['email']; $email = strip_tags($email); if(strlen($user) < 4 || strlen($user) > 15) { echo "You entered a too long or short username"; } elseif(strlen($pass) < 6 || strlen($pass) > 50) { echo "You entered a too long or short username"; } elseif(strlen($email) < 5 || strlen($pass) > 60) { echo "You entered a too long or short username"; } else { if(!isset($_POST['sport'])) { echo "Please enter a favourite sport"; } elseif ($pass != $passConf) { echo "Password did not match"; } else { $sport = $_POST['sport']; if($sport != 'Football' && $sport != 'Basketball' && $sport != 'Tennis' && $sport != 'Hockey' && $sport != 'Rugby' && $sport != 'Bike Riding' && $sport != 'Swimming') { echo "Please pick a favourite sport"; } else { $IP = $_SERVER['REMOTE_ADDR']; $date = date('d/m/y'); $connection = mysql_connect('localhost', 'liam_liam', 'code090'); $storedata = mysql_query('INSERT INTO liam_database(Username, Password, Email,Favourite Sport,IP,date); VALUES ( "'.addslashes($user).'" "'.md5($pass).'" "'.addslashes($email).'" "'.addslashes($sport).'" "'.addslashes($IP).'" "'.addslashes($date).'" ') or die(mysql_error()); echo "Successfully Registered!"; mysql_close($connection); } } } } } } } } else { echo "Please enter the fields!"; } ?> The error is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Sport, IP, date); VALUES ( "liam" ' at line 1
  6. I fixed that there was a error in my form but now this is the error im getting: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Sport,IP,date); VALUES ( "liam" ' at line 1
  7. I've changed the code to this now: <?php if(!isset($_POST['submitReg'])) { if(!isset($_POST['username'])) { echo "Please enter a username"; } else { if(!isset($_POST['pass'])) { echo "Please enter a password"; } else { if(!isset($_POST['passConf'])) { echo "Please enter a confirm password"; } else { if(!isset($_POST['email'])) { echo "Please enter a email address"; } else { $user = $_POST['username']; $user = strip_tags($user); $pass = $_POST['pass']; $passConf = $_POST['passConf']; $email = $_POST['email']; $email = strip_tags($email); if(strlen($user) < 4 || strlen($user) > 15) { echo "You entered a too long or short username"; } elseif(strlen($pass) < 6 || strlen($pass) > 50) { echo "You entered a too long or short username"; } elseif(strlen($email) < 5 || strlen($pass) > 60) { echo "You entered a too long or short username"; } else { if(!isset($_POST['sport'])) { echo "Please enter a favourite sport"; } elseif ($pass != $passConf) { echo "Password did not match"; } else { $sport = $_POST['sport']; if($sport != 'Football' && $sport != 'Basketball' && $sport != 'Tennis' && $sport != 'Hockey' && $sport != 'Rugby' && $sport != 'Bike Riding' && $sport != 'Swimming') { echo "Please pick a favourite sport"; } else { $IP = $_SERVER['REMOTE_ADDR']; $date = date('d/m/y'); $connection = mysql_connect('localhost', 'liam_liam', 'code090'); $storedata = mysql_query('INSERT INTO liam_database(Username, Password, Email,Favourite Sport,IP,date); VALUES ( "'.addslashes($user).'" "'.md5($pass).'" "'.addslashes($email).'" "'.addslashes($sport).'" "'.addslashes($IP).'" "'.addslashes($date).'" ') or die(mysql_error()); echo "Successfully Registered!"; mysql_close($connection); } } } } } } } } else { echo "Please enter the fields!"; } ?> Now, when i try to register it just keeps saying "Please enter a password" i can't seem to understand why when the field is set.
  8. Hmm something like this: <?php if($gender == "F") { echo "your/image/file.gif"; } elseif ($gender == "M") { echo "your/image/file1.gif"; } else { echo "Your not a male or female!"; } ?>
  9. Parse error: syntax error, unexpected T_STRING in C:\wamp\www\phpdesigner_tmp7.php on line 55 Thats the error i am getting heres the code: registerdone.php: <?php if(!isset($_POST['submitReg'])) { if(!isset($_POST['username'])) { echo "Please enter a username"; } else { if(!isset($_POST['pass'])) { echo "Please enter a password"; } else { if(!isset($_POST['passConf'])) { echo "Please enter a confirm password"; } else { if(!isset($_POST['email'])) { echo "Please enter a email address"; } else { $user = $_POST['username']; $user = strip_tags($user); $pass = $_POST['pass']; $passConf = $_POST['passConf']; $email = $_POST['email']; $email = strip_tags($email); if(strlen($user) < 4 || strlen($user) > 15) { echo "You entered a too long or short username"; } elseif(strlen($pass) < 6 || strlen($pass) > 50) { echo "You entered a too long or short username"; } elseif(strlen($email) < 5 || strlen($pass) > 60) { echo "You entered a too long or short username"; } else { if(!isset($_POST['sport'])) { echo "Please enter a favourite sport"; } elseif ($pass != $passConf) { echo "Password did not match"; } else { $sport = $_POST['sport']; if($sport != 'Football' && $sport != 'Basketball' && $sport != 'Tennis' && $sport != 'Hockey' && $sport != 'Rugby' && $sport != 'Bike Riding' && $sport != 'Swimming') { echo "Please pick a favourite sport"; } else { $IP = $_SERVER['REMOTE_ADDR']; $date = date('d/m/y'); $connection = mysql_connect('localhost', 'liam_liam', 'code090'); $storedata = mysql_query('INSERT INTO liam_database('Username, Password, Email, Favourite Sport, IP, date'); VALUES ( "'.addslashes($user).'" "'.md5($pass).'" "'.addslashes($email).'" "'.addslashes($sport).'" "'.addslashes($IP).'" "'.addslashes($date).'" ); or die(mysql_error()); echo "Successfully Registered!"; mysql_close($connection); } } } } } } } else { echo "Please fill in the registration form!"; } ?>
  10. Or your eyes went 5 centimetres to the right and you seen the creator name
  11. Professional errors are better for open source or a clients website but funny ones would be good for a personal site or your own business.
  12. I don't understand... I found one of my databases in databases section and ive put 1 table called user in it with 4 rows... can i store anything in them or do i have to change something like in those 4 rows could i store these 4 possible: Username Password Email Favourite sport ?
  13. Hey. My phpMyAdmin won't let me doing anything i don't have any databases... I try this: CREATE DATABASE user; (Thats what tizag tells me to do) and i get this error: #1044 - Access denied for user 'liam'@'localhost' to database 'user' What do i do?
  14. Eek... Just found out i can't register because they only accept credit cards and i want to use paypal
  15. I think so. It is called Enterprise hosting Great for the comment, I might sign up to them.
  16. Is anyone here using Acenet Enterprise hosting? I'm just trying to see everyone views it looks great in my opinion PHP 5 MySQL 5 500GB Hard disk 5,000gb Bandwidth cPanel 11 Linux OS and its only $20 for the first month and $10 for everyone other month And lots of big sites are using it.! ... whats your view?
  17. Hey. How do i get a image in the background of a text box like this: <input type="text" name="textfield"> how would i get a image to appear in the background of it?
  18. Thank-you. I'm not good at designing so i've built a basic registration form so far When i've done the registration form it will be public in BETA... I plan on starting this within the next 2 days if i learn everything i need too.
  19. Hey. I just want to know where i can get a Tutorial on using MySQL / phpMyAdmin and PHP together and how to even use MySQL because im planning on making my first login system soon and more stuff so i need to know how to use it. Thanks
  20. First one looks pretty simple and clean, Easy to use. And by the way on your second one the banner is repeating twice well on my screen it is.
  21. Why have you put all the message in a file? I found this i just registered: Liam has been resetted!
  22. When i was talking about not being able to register that was on IE i downloaded FireFox today and its perfect on that.
×
×
  • 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.