Jump to content

Artmark

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by Artmark

  1. Thanks guys Working great, customer is happy. Mark.....
  2. Hi guys Thanks I got it working now thanks. Mark.....
  3. Hi Guys it is Working Now thanks, but now placing code into html pages. If I want to add the members email into registration page do i have to change the data base too,if so how. Plus Do I have to make a new table for the profile page. Mark.....
  4. How Do I set up table for Profile page now. All the pages open and work but are still in original php page at the moment until i transfer them.
  5. I got it, I added that file and it works , now I need to add those codes to my html pages, , Question do I save them as a PHP page yes.
  6. No There are around 200 members in the association belonging to the website, so that how many that need to login. Now I get this message. Query: INSERT INTO members(firstname, lastname, login, passwd) VALUES('mark','wherritt','Artmark','89121d1473e99fb1c6d662bc92a22768') Failed with error: Unknown column 'firstname' in 'field list'
  7. They dont say they do it for you its only the registration and login form. you'll find it here http://www.cpassoc.com.au/PHP-Login.zip
  8. Hi I have a members login form of registration with First name ,last name, login name, Password ,confirm password. its now telling me I have no tables for this. I dont know what values to put in tables. I have all most 200 members. so do i put in 200 in the fields. Dont know what to do.
  9. its fine I accidently removed the wrong style sheet. Sites fine but I will leeve the form alone i think.
  10. Great now my whole website is not showing correctly. http://www.cpassoc.com.au looks like i have strip all the file and disconnect the site and connect a new one, and hope it works. I think it must have something to do with the database. big trouble, my client will be pissed. Mark....
  11. Query failed i WENT INTO THE MY PHPADMIN AND IT SHOWS THERE ARE NO TABLEs IN THe DATABASE I know nothing about adding table and the structure of the db. Mark.....
  12. GGGGRRRRRR PHP is for the experts or nerds. Its doing my head in. GGGGGRRRRRRRRR AAAAHHHHHHGGGGG. Sorry for making a noise but I am so frustrated, My clients want this login but I just cant do it and I dont want ot use Joomla or server side stuff like that ,its even harder to get your head around. Mark........
  13. Thanks, I know nothing about php, I only copy and paste if it works great. unless i can get someone thats willing to make one work for me on that website. I may have to give up. I should just stick to the basics. I would like to learn more it is important to please my clients, give them every thing they want on there website. Its beyond my fields. Thank you for being patient and giving me some assistance. Mark....
  14. Is there a easy way to connect this code withing html page http://www.cpassoc.com.au/PHP-Login.zip I cant get it to work. http://cpassoc.com.au/register-form.php Is there better code. See post in help folder too. Mark...
  15. Thanks for the support. I'll tell my client I cant do what they ask for a members log in ,its out of my field, thanks for the supports. Mark......
  16. This is the actual blank form code ,Now I want to place the code withing the website html pages so its not just a blank sign in page. http://www.cpassoc.com.au/PHP-Login.zip If some one has time could you please configure this for me to add to the clients website as they want a members loging and page only to be view by members. I dont know if that is the best form code but it look ok to me for what i want. But if some on has something better and easyer out there I would love to here from them. you can email me here: mark at artmarkdesigns.com I want a register page , a log in page , a confirmation page and pages hidden unless you are logged in as a member. and what ever other pages i need. My data base details. <?php define('DB_HOST', 'localhost'); define('DB_USER', 'cpassoc2_memark'); define('DB_PASSWORD', 'a69u69au2'); define('DB_DATABASE', 'cpassoc2_me'); ?> Thanks, Mark.....
  17. This is the login page http://cpassoc.com.au/register-form.php. Maybe I placed the code wrong or some thing. I just dont know what the heck i am doing. Mark..
  18. This is the whole page register-exec.php. <?php //Start session session_start(); //Include database connection details require_once('config.php'); //Array to store validation errors $errmsg_arr = array(); //Validation error flag $errflag = false; //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Failed to connect to server: ' . mysql_error()); mysql_select_db(DB_DATABASE) or die('Unable to select database'); //Select database $db = mysql_select_db(DB_DATABASE) or die('Unable to select database'); //Function to sanitize values received from the form. Prevents SQL injection function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } //Sanitize the POST values $fname = clean($_POST['fname']); $lname = clean($_POST['lname']); $login = clean($_POST['login']); $password = clean($_POST['password']); $cpassword = clean($_POST['cpassword']); //Input Validations if($fname == '') { $errmsg_arr[] = 'First name missing'; $errflag = true; } if($lname == '') { $errmsg_arr[] = 'Last name missing'; $errflag = true; } if($login == '') { $errmsg_arr[] = 'Login ID missing'; $errflag = true; } if($password == '') { $errmsg_arr[] = 'Password missing'; $errflag = true; } if($cpassword == '') { $errmsg_arr[] = 'Confirm password missing'; $errflag = true; } if( strcmp($password, $cpassword) != 0 ) { $errmsg_arr[] = 'Passwords do not match'; $errflag = true; } //Check for duplicate login ID if($login != '') { $qry = "SELECT * FROM members WHERE login='$login'"; $result = mysql_query($qry); if($result) { if(mysql_num_rows($result) > 0) { $errmsg_arr[] = 'Login ID already in use'; $errflag = true; } @mysql_free_result($result); } else { die("Query failed"); } } //If there are input validations, redirect back to the registration form if($errflag) { $_SESSION['ERRMSG_ARR'] = $errmsg_arr; session_write_close(); header("location: register-form.php"); exit(); } //Create INSERT query $qry = "INSERT INTO members(firstname, lastname, login, passwd) VALUES('$fname','$lname','$login','".md5($_POST['password'])."')"; $result = @mysql_query($qry); //Check whether the query was successful or not if($result) { header("location: register-success.php"); exit(); }else { die("Query failed"); } ?>
  19. This is the reigister-exec.php page. <?php //Start session session_start(); //Include database connection details require_once('config.php'); //Array to store validation errors $errmsg_arr = array(); //Validation error flag $errflag = false; //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Failed to connect to server: ' . mysql_error()); mysql_select_db(DB_DATABASE) or die('Unable to select database'); //Select database $db = mysql_select_db(DB_DATABASE) or die('Unable to select database'); //Function to sanitize values received from the form. Prevents SQL injection function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } //Sanitize the POST values $fname = clean($_POST['fname']); $lname = clean($_POST['lname']); $login = clean($_POST['login']); $password = clean($_POST['password']); $cpassword = clean($_POST['cpassword']); //Input Validations if($fname == '') { $errmsg_arr[] = 'First name missing'; $errflag = true; } if($lname == '') { $errmsg_arr[] = 'Last name missing'; $errflag = true; } if($login == '') { $errmsg_arr[] = 'Login ID missing'; $errflag = true; } if($password == '') { This is the config.php page. <?php define('DB_HOST', 'localhost'); define('DB_USER', 'cpassoc2_memark'); define('DB_PASSWORD', 'a69u69au2'); define('DB_DATABASE', 'cpassoc2_me'); ?>
  20. I am using Adobe Dreamweaver CS5 and new to searching falts.
  21. I have looked at all the pages and i can not find where the query is coming from to show you any code. mark.....
  22. Sorry i am new to this php, and asking for help. Mark.....
  23. ok now I get (Query failed) This is the config.php This is the Reigister-exec.php Thats how both pages look and when i click to register i get this message now. (Query failed) Mark.....
×
×
  • 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.