LiamProductions
Members-
Posts
496 -
Joined
-
Last visited
Never
Everything posted by LiamProductions
-
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?
-
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
-
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
-
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
-
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
-
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
-
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.
-
[SOLVED] New To PHP - Please help with 'else'.
LiamProductions replied to g3mma111's topic in PHP Coding Help
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!"; } ?> -
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!"; } ?>
-
Or your eyes went 5 centimetres to the right and you seen the creator name
-
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.
-
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 ?
-
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?
-
Eek... Just found out i can't register because they only accept credit cards and i want to use paypal
-
I think so. It is called Enterprise hosting Great for the comment, I might sign up to them.
-
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?
-
Just wanted to say hi!
LiamProductions replied to phpfreak's topic in PHPFreaks.com Website Feedback
LMAO -
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?
-
For you PHP & MySQL people to answer
LiamProductions replied to LiamProductions's topic in Miscellaneous
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. -
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
-
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.
-
Why have you put all the message in a file? I found this i just registered: Liam has been resetted!
-
When i was talking about not being able to register that was on IE i downloaded FireFox today and its perfect on that.
-
Alt+Shift+S Thanks