
timecatcher
Members-
Posts
78 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
timecatcher's Achievements

Member (2/5)
0
Reputation
-
Alright that seems to have worked. Thanks .
-
Ok i've been trying to install someones database class and he isn'tine right now. However im getting an error I don't understand. Any tips of what I've missed please? 'Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in /home/timecat/public_html/includes/config.php on line 13' require("../includes/database.php"); $db = new Database( array ( “host” => “localhost”, “name” => “”, “user” => "”, “pass” => “” ) ); That is line 12 and 13. However I have removed all the database information. Sorry I would type more but this website is being slow. Timecatcher.
-
Hmmm still no further, I think its just something simple but I just can't for the life of me work out how it should work. Any help would be greatly appreciated. Thanks. Tc.
-
Ok well I have my script set up so that it will echo out 10 of the values found in a specific database table. These values are echoed into a HTML table, however at the moment they all just go in one like strait down. Im wanting to know if its possible to make it so that I could get like 4 values to appear per line then goes down to the next bit for another 4 and so on, to make 12 in total. Like this: {} {} {} {} {} {} {} {} {} Instead of this: {} {} {} {} Heres the script at the moment: <?php require("../includes/config.php"); echo "$open"; $ucusername = ucfirst($username); echo "<h1>$ucusername's House Storage</h1>"; $query = mysql_query("SELECT * FROM storage WHERE userid='$id' LIMIT 10"); while($rows = mysql_fetch_array($query)) { $itemid = $rows['itemid']; $itemsquery = mysql_query("SELECT * FROM items WHERE id='$itemid'"); while($rows2 = mysql_fetch_array($itemsquery)) { $itemimage = $rows2['image']; $itemname = $rows2['name']; $itemdescription = $rows2['description']; } echo<<<echo <center><table><tr ><td width='80'><img src='http://kurukolands.co.uk/images/items/$itemimage'><br /></td><td><font color='green'><b>$itemname</b></font></td></tr></table></center>; echo; } echo "$close"; ?>
-
Sure sorry. Basically: The CSS file is set up to have the banner, content(where all the information from scripts go) and the navigation bar: http://kurukolands.co.uk/scripts/login.php That is how it looks now with just CSS being included into each script. However I want to use image mapping on the bits of the navigation bar (the bit with the pictures), but im not sure how to go about it. If that didn't make sense I could post the code from the CSS file? Basically I want to allow users to click the, world, tent, cross and grass on the navigation bar using image mapping, but im not sure how to go about it. Thanks TC.
-
Alright well after getting my CSS pages to load nicely and the PHP scripts to integrate well Im now wanting to work on the navigation system however Im in need of a bit of help working out how to structure it. Currently the navigation bar is located in the css file and it linked into all scripts...however im not sure how to make it so that I can click parts of the image without having to paste the image each time into a new file....well something like that. I hope this made sense. Thanks. Tc.
-
Brilliant thanks for the reply! I have it working now . Timecatcher.
-
Anyone please? Im still pretty stuck here. I've tried multiple times to fix but nothing seems to work. Thanks. Tc.
-
Hey guys im trying to structure my website, now that I have started with a few of the scripts: <?php session_start(); //Connects to the included file, (connectionfile.php) to allow database to be accessed. require("../includes/config.php"); //Checks all the information sent to the database for errors, or issues. if(isset($_POST['submit'])) { //Setting the strings. $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $password1 = mysql_real_escape_string($_POST['password1']); $firstname = mysql_real_escape_string($_POST['fname']); $lastname = mysql_real_escape_string($_POST['lname']); $email = mysql_real_escape_string($_POST['email']); $email1 = mysql_real_escape_string($_POST['email1']); $birthyear = mysql_real_escape_string($_POST['birthyear']); $birthmonth = mysql_real_escape_string($_POST['birthmonth']); $birthday = mysql_real_escape_string($_POST['birthday']); $ace = $_POST['ace']; $accesscode = 125826841397; //Setting sessions to save information on accidental entry. $_SESSION['username'] = $username; $_SESSION['firstname'] = $firstname; $_SESSION['lastname'] = $lastname; $_SESSION['email'] = $email; //Access code checks. if($ace != $accesscode) { $error .= "<li>Im sorry you need to enter the right access code on signup, this will change after Kuruko Lands is in BETA.</li>"; } if($birthyear > date(Y)-13) { echo "Im sorry but your are not of legal age to become a member of kurukolands.co.uk <a href=\"http://google.co.uk\">Google</a>"; die(); } if(empty($username)) { $error .= "<li>Please enter a username.</li>"; } //Checks that the username doesn't already exist within the database. $query = mysql_query("SELECT * FROM users WHERE username='".$username."'"); if(mysql_num_rows($query) > 0) { $error .= "<li>Sorry that username is already taken, please create another one.</li>"; } elseif(strlen($username) < 3) { $error .= "<li>Please choose a username longer than 3 characters.</li>"; } //Remeber next time to use forward slash. And the [] thingys. elseif(preg_match("/^([a-zA-Z0-9_.-])+$/" , $username) == FALSE) { $error .= "<li>Your username can only contain these characters: A-Za-z0-9_</li>"; } //Add more words here to make the profanity filter more strict. $filter = array('fuck', 'cunt', 'shit', 'dick', 'nigger'); //Checks to see if any of the filtered words are found in the username and prints out an error if true. for($f = 0; $f < count($filter); $f++) { //The 'i' at the end of preg-match, makes it an case-insensitive search. if(preg_match('/'.$filter[$f].'/i', $username) == TRUE) { $error .= "<li>This website does not allow profanity, please select a cleaner username.</li>"; } } //Password checks. //You can change the variable to 1 if you want stronger security. $securityvar = 1; if(empty($password)) { $error .= "<li>Please enter a password</li>"; } elseif(empty($password1)) { $error .= "<li>You need to enter your confirmation password.</li>"; } elseif(strlen($password) < 4) { $error .= "<li>Please enter a longer password.</li>"; } elseif($password != $password1) { $error .= "<li>Please enter the correct confirmation password.</li>"; } elseif($securityvar == 1) { if(preg_match("/[A-Z]/", $password) == FALSE) { $error .= "<li>Please have a combination of Upper case, lower case, numbers and special characters.</li>"; } elseif(preg_match("/[0-9]/", $password) == FALSE) { $error .= "<li>Please have a combination of Upper case, lower case, numbers and special characters.</li>"; } elseif(preg_match("/[~!@#$%^&*-]/", $password) == FALSE) { $error .= "<li>Please have a combination of Upper case, lower case, numbers and special characters.</li>"; } elseif(preg_match("/[a-z]/", $password) == FALSE) { $error .= "<li>Please have a combination of Upper case, lower case, numbers and special characters.</li>"; } } //E-mail checks. //Change to 0 to remove the e-mail confirmation check. if(preg_match("/[@]/", $email) == FALSE) { $error .= "<li>Please choose a valid e-mail address.</li>"; } elseif(preg_match("/[.]/", $email) == FALSE) { $error .= "<li>Please choose a valid e-mail address.</li>"; } $query = mysql_query("SELECT * FROM users WHERE email='".$email."'"); if(mysql_num_rows($query) > 0) { $error .= "<li>Sorry that email is already taken, please create another one.</li>"; } elseif($email1 != $email) { $error .= "<li>Please enter the same e-mail address in the confirmation box.</li>"; } //Birthdate checks. //This assigns each month a numeric value. if($birthmonth == "Jan") { $birthmonth = 1; } elseif($birthmonth == "Feb") { $birthmonth = 2; } elseif($birthmonth == "Mar") { $birthmonth = 3; } elseif($birthmonth == "Apr") { $birthmonth = 4; } elseif($birthmonth == "May") { $birthmonth = 5; } elseif($birthmonth == "Jun") { $birthmonth = 6; } elseif($birthmonth == "Jul") { $birthmonth = 7; } elseif($birthmonth == "Aug") { $birthmonth = 8; } elseif($birthmonth == "Sep") { $birthmonth = 9; } elseif($birthmonth == "Oct") { $birthmonth = 10; } elseif($birthmonth == "Nov") { $birthmonth = 11; } elseif($birthmonth == "Dec") { $birthmonth = 12; } //This piece of code equates for leap years and feburary 29th. if($birthmonth == 2 && $birthday > 29) { $error .= "<li>Please enter a valid birthday, i.e not 30th February.</li>"; } if($birthmonth == 4 && $birthday > 30) { $error .= "<li>Please enter a valid birthday, i.e not 30th February.</li>"; } if($birthmonth == 6 && $birthday > 30) { $error .= "<li>Please enter a valid birthday, i.e not 30th February.</li>"; } if($birthmonth == 8 && $birthday > 30) { $error .= "<li>Please enter a valid birthday, i.e not 30th February.</li>"; } if($birthmonth == 10 && $birthday > 30) { $error .= "<li>Please enter a valid birthday, i.e not 30th February.</li>"; } if($birthmonth == 12 && $birthday > 30) { $error .= "<li>Please enter a valid birthday, i.e not 30th February.</li>"; } } //DATABASE INFORMATION GOES BELOW!!! //All the database information gets stored here, generally before any HTML output is used. if(!isset($error) && isset($_POST['submit'])) { $username = mysql_real_escape_string($username); $password = mysql_real_escape_string(md5($password)); $firstname = mysql_real_escape_string($firstname); $lastname = mysql_real_escape_string($lastname); $email = mysql_real_escape_string($email); $birthday = mysql_real_escape_string($birthday); $birthmonth = mysql_real_escape_string($birthmonth); $birthyear = mysql_real_escape_string($birthyear); $points = 0; mysql_query("INSERT INTO users (username, password, firstname, lastname, email, birthday, birthmonth, birthyear, points) VALUES ('$username', '$password', '$firstname', '$lastname', '$email', '$birthday', '$birthmonth', '$birthyear', '$points') ") or die(mysql_error()); $cookie = 1; } //HTML FORM, this asks for all the data needed from the user. echo "$banner"; echo "$layout<div id='content'>"; echo"Welcome to Kuruko Lands! You can begin your journey by registering below.<br />"; echo"Please make sure you are over the age of 13 before registering to this website. <br />"; echo"<b>COPPA laws are respected.</b> <br />"; if(isset($_SESSION['firstname'])) { $a = $_SESSION['firstname']; } if(isset($_SESSION['lastname'])) { $b = $_SESSION['lastname']; } if(isset($_SESSION['email'])) { $c = $_SESSION['email']; } if(isset($_SESSION['username'])) { $d = $_SESSION['username']; } echo<<<echo Please enter your first name: <br /> <form method="post" action"><input type="text" name="fname" value="$a"> <br /> Please enter your last name: <br /> <input type="text" name="lname" value="$b"> <br /> Please select your real birth date: <br /> Year: <select name="birthyear"> echo; //The date("y") part provides just the year from the date function. $currentYear = date("Y"); for($by = $currentYear; $by>=1900; $by--) { echo<<<echo <option value="$by">$by</option> echo; } //$dom = days of month. echo<<<echo </select> Day: <select name="birthday"> echo; $dom = 31; for($bd = $dom; $bd>=1; $bd--) { echo<<<echo <option value="$bd">$bd</option> echo; } echo<<<echo </select> Month: <select name="birthmonth"> echo; //Names of the months. $month = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); //Echoing out each month in turn. foreach($month as $month1) { echo<<<echo <option value="$month1">$month1</option> echo; } echo<<<echo </select> <br /> Please select your country: <br /> <select name="country"> echo; //The list of countries, Judd I got this offline because I don't think my geography is that good . $countries = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombi", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe" ); foreach($countries as $countries1) { echo<<<echo <option value="$countries1">$countries1</option> echo; } echo<<<echo </select> <br /> Please enter your e-mail address: (Must contain '@' and '.') <br /> <input type="text" name="email" value="$c"> <br /> Please confirm your e-mail address: <br /> <input type="text" name="email1" value="$c"> <br /> Please enter your desired username: (Only A-Za-z0-9) <br /> <input type="text" name="username" value="$d"> <br /> Please enter your desired password: (Must include upper case, lower case, special characters and numbers) <br /> <input type="password" name="password"> <br /> Confirm your password choice: <br /> <input type="password" name="password1"> <br /> Please enter the Access code: <br /> <input type="text" name="ace"> <br /> <input type="submit" name="submit" value="Submit"> </form> echo; //The user is informed that there are either errors, or there registration has been successful. if(isset($error) && isset($_POST['submit'])) { //This echo's out the error's that have been found in a list. echo "<center><ul>$error</ul></center>"; } elseif(isset($_POST['submit']) && !isset($error)) { //Welcome message. echo "Welcome to Kuruko Lands! You journey awaits you."; } echo "</div>"; ?> <html> <title> Register -- Kuruko Lands </title> </html> Heres my register script which works however the banner doesn't appear when it should. Its linked to my config script: <?php //Template information. //Connect information. mysql_connect("localhost", "********", "************") or die(mysql_error()); mysql_select_db("*******") or die(mysql_error()); //The string containing the layout include string. $layout = "<link rel='stylesheet' href='../includes/template/layout.css' type='text/css'>"; $banner = "<link rel='stylesheet' href='../includes/template/layout.css' type='text/css'><div id='banner'></div>" ?> Then ofcourse theres the css file: #banner{ left: 0px; top: 0px; width: 1180px; height: 123px; color: #000000; postion: absolute; background-image: url(images/template/banner.png); } #nav{ left: 0px; top: 123px; width: 150px; height: 300px; color: #000000; postion: absolute; background-image: url(../images/template/navbar.png); } #content{ top: 210px; left: 170px; height: 1500px; width: 1050px; color: #000000; position: absolute; overflow: auto; } #profile{ left: 0px; top: 140px; width: 150px; height: 75px; color: #000000; position: absolute; background-image: url(../images/profilebackground.gif); } Just so you know i've tryed the images with the ../ and without, doesn't seem to make a difference, and im now asking you guys just incase you might know a way I can get the banner to appear please , thanks!
-
Hello, im having a few issues that I can't think how to solve concerning my register script. Im getting the error password empty before I get a username empty error. I don't fully understand why this is. My second issue is im not sure how to convert the three date variables into a birthday field in my database. The last issue I think is the fact that I have to take into consideration those born in leap years since clearly february 29th doesn't always exist. Hope this makes sense, and someone could shed some light on this for me. Thanks. Here is the web address for the script: http://kurukolands.co.uk/Register.php and the script itself: <?php //Connects to the included file, (connectionfile.php) to allow database to be accessed. //If statement checking that everything is in order and the user can then be logged in. if(isset($username) && isset($password)) { //Cookie sending information goes here. (Cookies cannot be sent after the header, only accessed.) setcookie(username, $username); setcookie(password, $password); } //Checks all the information sent to the database for errors, or issues. if(isset($_POST['submit'])) { //Setting the strings. $username = $_POST['username']; $password = $_POST['password']; $password1 = $_POST['password1']; $firstname = $_POST['fname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $birthyear = $_POST['birthyear']; $birthmonth = $_POST['birthmonth']; $birthday = $_POST['birthday']; //Username checks. if(empty($username)) { $error = "<li>Please enter a username.</li>"; } elseif(strlen($username) < 3) { $error = "<li>Please choose a username longer than 3 characters.</li>"; } //Remeber next time to use forward slash. And the [] thingys. elseif(preg_match("/^([a-zA-Z0-9_.-])+$/" , $username) == FALSE) { $error = "<li>Your username can only contain these characters: A-Za-z0-9_</li>"; } //Add more words here to make the profanity filter more strict. $filter = array('fuck', 'cunt', 'shit', 'dick', 'nigger'); //Checks to see if any of the filtered words are found in the username and prints out an error if true. for($f = 0; $f < count($filter); $f++) { //The 'i' at the end of preg-match, makes it an case-insensitive search. if(preg_match('/'.$filter[$f].'/i', $username) == TRUE) { $error = "<li>This website does not allow profanity, please select a cleaner username.</li>"; } } //Password checks. //You can change the variable to 1 if you want stronger security. $securityvar = 1; if(empty($password)) { $error = "<li>Please enter a password</li>"; } elseif(empty($password1)) { $error = "<li>You need to enter your confirmation password.</li>"; } elseif(strlen($password) < 4) { $error = "<li>Please enter a longer password.</li>"; } elseif($securityvar == 1) { if(preg_match("/[A-Z]/", $password) == FALSE) { $error = "<li>Please have a combination of Upper case, lower case, numbers and special characters please.</li>"; } elseif(preg_match("/[0-9]/", $password) == FALSE) { $error = "<li>Please have a combination of Upper case, lower case, numbers and special characters please.</li>"; } elseif(preg_match("/[~!@#$%^&*]/", $password) == FALSE) { $error = "<li>Please have a combination of Upper case, lower case, numbers and special characters please.</li>"; } elseif(preg_match("/[a-z]/", $password) == FALSE) { $error = "<li>Please have a combination of Upper case, lower case, numbers and special characters please.</li>"; } } //E-mail checks. //Birthdate checks. } //Cleaning function used to make it easier to keep from SQL injects. function cleandb($clean) { mysql_real_escape_string(html_entities($clean)); } //All the database information gets stored here, generally before any HTML output is used. //HTML FORM, this asks for all the data needed from the user. echo"Welcome to PETSITENAME! You can begin your journey by registering below.<br />"; echo"Please make sure you are over the age of 13 before registering to this website. <br />"; echo"<b>COPPA laws are respected.</b> <br />"; echo<<<echo Please enter your first name:<form method="post" action"><input type="text" name="fname"> <br /> Please enter your last name: <input type="text" name="lname"> <br /> Please select your real birth date: Year: <select name="birthyear"> echo; //The date("y") part provides just the year from the date function. $currentYear = date("Y"); for($by = $currentYear; $by>=1900; $by--) { echo<<<echo <option value="$by">$by</option> echo; } //$dom = days of month. echo<<<echo </select> Day: <select name="birthday"> echo; $dom = 31; for($bd = $dom; $bd>=1; $bd--) { echo<<<echo <option value="$bd">$bd</option> echo; } echo<<<echo </select> Month: <select name="birthmonth"> echo; //Names of the months. $month = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); //Echoing out each month in turn. foreach($month as $month1) { echo<<<echo <option value="$month1">$month1</option> echo; } echo<<<echo </select> <br /> Please select your country: <select name="country"> echo; //The list of countries, Judd I got this offline because I don't think my geography is that good . $countries = array( "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombi", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe" ); foreach($countries as $countries1) { echo<<<echo <option value="$countries1">$countries1</option> echo; } echo<<<echo </select> <br /> Please enter your e-mail address: <input type="text" name="email"> <br /> Please enter your desired username: <input type="text" name="username"> <br /> Please enter your desired password: <input type="password" name="password"> <br /> Confirm your password choice: <input type="password" name="password1"> <br /> <input type="submit" name="submit" value="Submit"> </form> echo; //The user is informed that there are either errors, or there registration has been successful. if(isset($error) && isset($_POST['submit'])) { //This echo's out the error's that have been found in a list. echo "<center>$error</center>"; } elseif(isset($_['submit']) && !isset($error)) { echo "Congratulations! You have now been signed up to PETSITE!"; } ?> <html> <title> Register -- PETSITENAME </title> </html>
-
Oh hehe I meant, any type of 'for statement' sorry. But thanks anyway this will be useful. Timecatcher .
-
Foreach ALWAYS throughs me, but lets see. I tried to learn that part again yesterday we shall see. Thanks guys. Timecatcher.
-
Thankyou I will give that a shot, I don't know exactly how to implement it but trial and error didn't do anyone halm. Timecatcher.
-
Ok im in a competition for the best register.php script, both secure customizable and bug free. So you may see a few more of these posts, sorry guys. You have a GOOD reputation of providing the answers I need 99% of the time when im having a blond moment. So heres my question, Is there any easier way of listing all the years since 1900-2009 without typing and c&p. (Oh, and if so what is it, im sure its plainly simple as it seems like it is in my head but I just can't think of a way.) Thanks.
-
Bump. I have tried adding the $_COOKIE['password'] one aswell but still to no avail and it still wont recognise the $username variable when I try and echo it out. Help appreciated. TC.